oota-llvm.git
20 years agoImplement test/Regression/Transforms/GCSE/undefined_load.ll
Chris Lattner [Sat, 3 Apr 2004 00:45:16 +0000 (00:45 +0000)]
Implement test/Regression/Transforms/GCSE/undefined_load.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12641 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Sat, 3 Apr 2004 00:44:56 +0000 (00:44 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12640 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a break in the default case
Chris Lattner [Sat, 3 Apr 2004 00:43:03 +0000 (00:43 +0000)]
Add a break in the default case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12639 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd autoconf support for isStandardOutAConsole ().
Brian Gaeke [Fri, 2 Apr 2004 21:26:04 +0000 (21:26 +0000)]
Add autoconf support for isStandardOutAConsole ().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12638 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated using autoheader-2.57.
Brian Gaeke [Fri, 2 Apr 2004 21:26:03 +0000 (21:26 +0000)]
Regenerated using autoheader-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12637 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated using autoconf-2.57.
Brian Gaeke [Fri, 2 Apr 2004 21:26:02 +0000 (21:26 +0000)]
Regenerated using autoconf-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12636 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agocheck for isatty function
Brian Gaeke [Fri, 2 Apr 2004 21:06:44 +0000 (21:06 +0000)]
check for isatty function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12635 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove obsolete analyses
Chris Lattner [Fri, 2 Apr 2004 20:56:33 +0000 (20:56 +0000)]
Remove obsolete analyses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12634 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove obsolete files
Chris Lattner [Fri, 2 Apr 2004 20:56:24 +0000 (20:56 +0000)]
Remove obsolete files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12633 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for many of the MRegisterInfo callbacks.
Brian Gaeke [Fri, 2 Apr 2004 20:53:37 +0000 (20:53 +0000)]
Add support for many of the MRegisterInfo callbacks.
Eliminating call-frame pseudo instrs and frame indices are still stubs.
Flesh out the emitPrologue method based on better ABI knowledge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12632 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd load, store, and NOP instructions.
Brian Gaeke [Fri, 2 Apr 2004 20:53:37 +0000 (20:53 +0000)]
Add load, store, and NOP instructions.
Fix up comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12631 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for printing pc-relative displacements of functions (as used in
Brian Gaeke [Fri, 2 Apr 2004 20:53:35 +0000 (20:53 +0000)]
Add support for printing pc-relative displacements of functions (as used in
the CALL instruction).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12630 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for call instructions (0-ary only for now).
Brian Gaeke [Fri, 2 Apr 2004 20:53:33 +0000 (20:53 +0000)]
Add support for call instructions (0-ary only for now).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12629 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agocleanup some long-dead code
Chris Lattner [Fri, 2 Apr 2004 20:46:26 +0000 (20:46 +0000)]
cleanup some long-dead code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12628 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIgnore configure produced files
Chris Lattner [Fri, 2 Apr 2004 20:34:30 +0000 (20:34 +0000)]
Ignore configure produced files

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12627 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTweak libraries for scev changes
Chris Lattner [Fri, 2 Apr 2004 20:32:46 +0000 (20:32 +0000)]
Tweak libraries for scev changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12625 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agonew testcase
Chris Lattner [Fri, 2 Apr 2004 20:27:47 +0000 (20:27 +0000)]
new testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12624 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoComment out debugging printouts
Chris Lattner [Fri, 2 Apr 2004 20:26:46 +0000 (20:26 +0000)]
Comment out debugging printouts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12623 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcases for the indvars pass
Chris Lattner [Fri, 2 Apr 2004 20:26:04 +0000 (20:26 +0000)]
New testcases for the indvars pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12622 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTweak testcase to work with new indvars pass
Chris Lattner [Fri, 2 Apr 2004 20:25:26 +0000 (20:25 +0000)]
Tweak testcase to work with new indvars pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12621 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRewrite the indvars pass to use the ScalarEvolution analysis.
Chris Lattner [Fri, 2 Apr 2004 20:24:31 +0000 (20:24 +0000)]
Rewrite the indvars pass to use the ScalarEvolution analysis.

This also implements some new features for the indvars pass, including
linear function test replacement, exit value substitution, and it works with
a much more general class of induction variables and loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12620 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a new analysis
Chris Lattner [Fri, 2 Apr 2004 20:23:17 +0000 (20:23 +0000)]
Add a new analysis

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12619 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix the obvious bug in my previous checkin
Chris Lattner [Fri, 2 Apr 2004 18:15:10 +0000 (18:15 +0000)]
Fix the obvious bug in my previous checkin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12618 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement Transforms/SimplifyCFG/return-merge.ll
Chris Lattner [Fri, 2 Apr 2004 18:13:43 +0000 (18:13 +0000)]
Implement Transforms/SimplifyCFG/return-merge.ll

This actually causes us to turn code like:

  return C ? A : B;

into a select instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12617 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Fri, 2 Apr 2004 18:12:49 +0000 (18:12 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12616 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoClean up code a bit.
Alkis Evlogimenos [Fri, 2 Apr 2004 18:11:32 +0000 (18:11 +0000)]
Clean up code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12615 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOnly strip symbols if emitting bytecode to the assembly file.
Brian Gaeke [Fri, 2 Apr 2004 17:52:40 +0000 (17:52 +0000)]
Only strip symbols if emitting bytecode to the assembly file.

Move lowerselect pass to come after preselection.  Move machine
code construction and stack slots pass to come right before instruction
selection. This is to help fix perlbmk.

Update comments.

Make the sequence of passes in addPassesToJITCompile look more like
the sequence of passes in addPassesToEmitAssembly, including support
for -print-machineinstrs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12614 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for constant select expressions. Clarify the assertion failure msg.
Brian Gaeke [Fri, 2 Apr 2004 17:52:29 +0000 (17:52 +0000)]
Add support for constant select expressions. Clarify the assertion failure msg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12613 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMinor speedup
Chris Lattner [Fri, 2 Apr 2004 16:28:32 +0000 (16:28 +0000)]
Minor speedup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12612 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix type in comments
Alkis Evlogimenos [Fri, 2 Apr 2004 16:02:50 +0000 (16:02 +0000)]
Fix type in comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12611 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix type in instruction builder instantiation
Alkis Evlogimenos [Fri, 2 Apr 2004 15:51:03 +0000 (15:51 +0000)]
Fix type in instruction builder instantiation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12610 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake the verifier API more complete and useful.
Chris Lattner [Fri, 2 Apr 2004 15:45:08 +0000 (15:45 +0000)]
Make the verifier API more complete and useful.

Patch contributed by Reid Spencer

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12609 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake the verifier API more complete and useful
Chris Lattner [Fri, 2 Apr 2004 15:44:33 +0000 (15:44 +0000)]
Make the verifier API more complete and useful

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12608 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd more ADC and SBB variants
Alkis Evlogimenos [Fri, 2 Apr 2004 07:11:10 +0000 (07:11 +0000)]
Add more ADC and SBB variants

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12607 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agominor formatting change
Chris Lattner [Fri, 2 Apr 2004 06:32:45 +0000 (06:32 +0000)]
minor formatting change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12606 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix two pretty serious bugs:
Chris Lattner [Fri, 2 Apr 2004 06:32:17 +0000 (06:32 +0000)]
Fix two pretty serious bugs:
  1. Each time the loop extractor extracted a loop, we would leak a module.
  2. When we extracted a loop, we didn't add the new function to the list of
     miscompiled functions.  Thus if the bug was in a loop nest and we
     extracted it, we could actually *LOSE THE BUG*, which is very bad.

With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12605 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a fairly nasty bug that prevented bugpoint from working quite right when
Chris Lattner [Fri, 2 Apr 2004 06:30:33 +0000 (06:30 +0000)]
Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12604 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoIf the program returns a non-zero exit value, don't leave files laying
Chris Lattner [Fri, 2 Apr 2004 05:33:06 +0000 (05:33 +0000)]
If the program returns a non-zero exit value, don't leave files laying
around

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12603 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix wonky header
Chris Lattner [Fri, 2 Apr 2004 05:06:57 +0000 (05:06 +0000)]
Fix wonky header
Address PR305: LLVM tools will happily spew bytecode onto your terminal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12602 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new function
Chris Lattner [Fri, 2 Apr 2004 05:04:12 +0000 (05:04 +0000)]
Add new function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12601 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd new function, autoconf support required tho
Chris Lattner [Fri, 2 Apr 2004 05:04:03 +0000 (05:04 +0000)]
Add new function, autoconf support required tho

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12600 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed
Chris Lattner [Thu, 1 Apr 2004 20:31:29 +0000 (20:31 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12598 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix PR310 and TailDup/2004-04-01-DemoteRegToStack.llx
Chris Lattner [Thu, 1 Apr 2004 20:28:45 +0000 (20:28 +0000)]
Fix PR310 and TailDup/2004-04-01-DemoteRegToStack.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12597 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase for PR310
Chris Lattner [Thu, 1 Apr 2004 20:28:35 +0000 (20:28 +0000)]
New testcase for PR310

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12596 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove some assertions that are now bogus with the last patch I put in
Chris Lattner [Thu, 1 Apr 2004 19:21:46 +0000 (19:21 +0000)]
Remove some assertions that are now bogus with the last patch I put in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12595 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed
Chris Lattner [Thu, 1 Apr 2004 19:09:49 +0000 (19:09 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12593 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix PR306: Loop simplify incorrectly updates dominator information
Chris Lattner [Thu, 1 Apr 2004 19:06:07 +0000 (19:06 +0000)]
Fix PR306: Loop simplify incorrectly updates dominator information
Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12592 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase for PR306
Chris Lattner [Thu, 1 Apr 2004 19:05:54 +0000 (19:05 +0000)]
New testcase for PR306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12591 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix grammar.
Misha Brukman [Thu, 1 Apr 2004 17:15:42 +0000 (17:15 +0000)]
Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12590 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for select constant expressions to the CBE, fixing SIOD
Chris Lattner [Thu, 1 Apr 2004 05:28:26 +0000 (05:28 +0000)]
Add support for select constant expressions to the CBE, fixing SIOD

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12589 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSimplify code by using the more powerful BuildMI forms.
Chris Lattner [Thu, 1 Apr 2004 04:06:09 +0000 (04:06 +0000)]
Simplify code by using the more powerful BuildMI forms.
Implement a small optimization.  In test/Regression/CodeGen/X86/select.ll,
we now generate this for foldSel3:

foldSel3:
        mov %AL, BYTE PTR [%ESP + 4]
        fld DWORD PTR [%ESP + 8]
        fld DWORD PTR [%ESP + 12]
        mov %EAX, DWORD PTR [%ESP + 16]
        mov %ECX, DWORD PTR [%ESP + 20]
        cmp %EAX, %ECX
        fxch %ST(1)
        fcmovae %ST(0), %ST(1)
***     fstp %ST(1)
        ret

Instead of:

foldSel3:
        mov %AL, BYTE PTR [%ESP + 4]
        fld DWORD PTR [%ESP + 8]
        fld DWORD PTR [%ESP + 12]
        mov %EAX, DWORD PTR [%ESP + 16]
        mov %ECX, DWORD PTR [%ESP + 20]
        cmp %EAX, %ECX
        fxch %ST(1)
        fcmovae %ST(0), %ST(1)
***     fxch %ST(1)
***     fstp %ST(0)
        ret

In practice, this only effects code size: performance should be basically
unaffected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12588 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWrap at 80 cols
Chris Lattner [Thu, 1 Apr 2004 04:03:27 +0000 (04:03 +0000)]
Wrap at 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12587 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAllow converting a builder to an iterator
Chris Lattner [Thu, 1 Apr 2004 04:03:10 +0000 (04:03 +0000)]
Allow converting a builder to an iterator

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12586 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTests for fp cmov's that I forgot to check in earlier
Chris Lattner [Thu, 1 Apr 2004 03:47:56 +0000 (03:47 +0000)]
Tests for fp cmov's that I forgot to check in earlier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12585 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoClear out all of the changes. Reset version numbers to 1.3
Chris Lattner [Thu, 1 Apr 2004 00:41:31 +0000 (00:41 +0000)]
Clear out all of the changes.  Reset version numbers to 1.3
add note about select

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12584 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd clear() forwarding method.
Brian Gaeke [Wed, 31 Mar 2004 22:43:12 +0000 (22:43 +0000)]
Add clear() forwarding method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12580 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGenerate slightly smaller code, "test R, R" instead of "cmp R, 0"
Chris Lattner [Wed, 31 Mar 2004 22:22:36 +0000 (22:22 +0000)]
Generate slightly smaller code, "test R, R" instead of "cmp R, 0"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12579 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe X86 backend no longer needs the select lowering pass.
Chris Lattner [Wed, 31 Mar 2004 22:03:46 +0000 (22:03 +0000)]
The X86 backend no longer needs the select lowering pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12578 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCodegen FP select instructions into X86 conditional moves. Annoyingly enough
Chris Lattner [Wed, 31 Mar 2004 22:03:35 +0000 (22:03 +0000)]
Codegen FP select instructions into X86 conditional moves.  Annoyingly enough
the X86 does not support a full set of fp cmove instructions, so we can't always
fold the condition into the select.  :(  Yuck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12577 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for floating point conditional move instructions
Chris Lattner [Wed, 31 Mar 2004 22:02:36 +0000 (22:02 +0000)]
Add support for floating point conditional move instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12576 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for FP cmoves
Chris Lattner [Wed, 31 Mar 2004 22:02:21 +0000 (22:02 +0000)]
Add support for FP cmoves

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12575 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd FP conditional move instructions, which annoyingly have special properties
Chris Lattner [Wed, 31 Mar 2004 22:02:13 +0000 (22:02 +0000)]
Add FP conditional move instructions, which annoyingly have special properties
that require the asmwriter to be extended (printing implicit uses before the
explicit operands)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12574 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd warning
Chris Lattner [Wed, 31 Mar 2004 22:00:30 +0000 (22:00 +0000)]
Add warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12573 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMBB::remove should not modify the iterator passed in
Chris Lattner [Wed, 31 Mar 2004 21:59:59 +0000 (21:59 +0000)]
MBB::remove should not modify the iterator passed in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12572 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMachineBasicBlock::remove should not modify the iterator passed in
Chris Lattner [Wed, 31 Mar 2004 21:59:29 +0000 (21:59 +0000)]
MachineBasicBlock::remove should not modify the iterator passed in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12571 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImprove description, add warning
Chris Lattner [Wed, 31 Mar 2004 21:59:07 +0000 (21:59 +0000)]
Improve description, add warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12570 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMachineBasicBlock::remove should not change the iterator passed into it
Chris Lattner [Wed, 31 Mar 2004 21:58:50 +0000 (21:58 +0000)]
MachineBasicBlock::remove should not change the iterator passed into it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12569 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFactor out getStaticStackSize from InsertPrologCode(), so that I can more
Brian Gaeke [Wed, 31 Mar 2004 20:58:37 +0000 (20:58 +0000)]
Factor out getStaticStackSize from InsertPrologCode(), so that I can more
easily steal it for a separate use in the reoptimizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12568 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse the true, decoded name of the archive member in getObjectType.
Brian Gaeke [Wed, 31 Mar 2004 19:51:00 +0000 (19:51 +0000)]
Use the true, decoded name of the archive member in getObjectType.

In ReadArchiveBuffer, make sure that MemberName is set in the case where
getObjectType would want to return SVR4LongFilename.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12567 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAvoid TRUE and FALSE which apparently conflict with some macros on OSX
Chris Lattner [Wed, 31 Mar 2004 03:49:47 +0000 (03:49 +0000)]
Avoid TRUE and FALSE which apparently conflict with some macros on OSX

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12566 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix linking of constant expr casts due to type resolution changes. With
Chris Lattner [Wed, 31 Mar 2004 02:58:28 +0000 (02:58 +0000)]
Fix linking of constant expr casts due to type resolution changes.  With
this and the other patches 253.perlbmk links again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12565 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for constant expr casts
Chris Lattner [Wed, 31 Mar 2004 02:56:11 +0000 (02:56 +0000)]
Add support for constant expr casts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12564 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd support for reading constantexpr select instructions
Chris Lattner [Wed, 31 Mar 2004 02:53:59 +0000 (02:53 +0000)]
Add support for reading constantexpr select instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12563 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a latent bug in select constantexpr handling that was broke 253.perlbmk
Chris Lattner [Tue, 30 Mar 2004 22:51:03 +0000 (22:51 +0000)]
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12562 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCorrectly update LiveVariables when an instruction changes
Alkis Evlogimenos [Tue, 30 Mar 2004 22:44:39 +0000 (22:44 +0000)]
Correctly update LiveVariables when an instruction changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12561 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFold comparisons into select instructions, making much better code and
Chris Lattner [Tue, 30 Mar 2004 22:39:09 +0000 (22:39 +0000)]
Fold comparisons into select instructions, making much better code and
using our broad selection of movcc instructions.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12560 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest folding comparisons into select instructions
Chris Lattner [Tue, 30 Mar 2004 22:37:04 +0000 (22:37 +0000)]
Test folding comparisons into select instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12559 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase. This now codegens to:
Chris Lattner [Tue, 30 Mar 2004 22:36:52 +0000 (22:36 +0000)]
New testcase.  This now codegens to:

max:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, DWORD PTR [%ESP + 8]
        cmp %EAX, %ECX
        cmovle %EAX, %ECX
        ret

Someone should really implement passing arguments through registers for
known-internal functions.  :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12558 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement spill code folding for all of the conditional move instructions
Chris Lattner [Tue, 30 Mar 2004 21:29:47 +0000 (21:29 +0000)]
Implement spill code folding for all of the conditional move instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12554 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd direct support for integer select instructions, though we still don't support
Chris Lattner [Tue, 30 Mar 2004 21:22:00 +0000 (21:22 +0000)]
Add direct support for integer select instructions, though we still don't support
folding compares into the select yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12553 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase for select instructions
Chris Lattner [Tue, 30 Mar 2004 21:21:14 +0000 (21:21 +0000)]
New testcase for select instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12552 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx
Chris Lattner [Tue, 30 Mar 2004 20:58:25 +0000 (20:58 +0000)]
Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12551 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase that crashes the assembler
Chris Lattner [Tue, 30 Mar 2004 20:58:00 +0000 (20:58 +0000)]
New testcase that crashes the assembler

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12550 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix some serious bugs in the cmov descriptions, which didn't cause a problem because
Chris Lattner [Tue, 30 Mar 2004 20:18:02 +0000 (20:18 +0000)]
Fix some serious bugs in the cmov descriptions, which didn't cause a problem because
we never generated them

Make indentation a bit more consistent

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12549 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoStart cleaning up this pass so that I can debug it.
Brian Gaeke [Tue, 30 Mar 2004 19:53:46 +0000 (19:53 +0000)]
Start cleaning up this pass so that I can debug it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12548 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOops, actually USE the previously computed value
Chris Lattner [Tue, 30 Mar 2004 19:45:39 +0000 (19:45 +0000)]
Oops, actually USE the previously computed value

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12547 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest general value/value selection which we can do now that we use the
Chris Lattner [Tue, 30 Mar 2004 19:45:11 +0000 (19:45 +0000)]
Test general value/value selection which we can do now that we use the
select instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12546 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNow that all the code generators support the select instruction, and the instcombine
Chris Lattner [Tue, 30 Mar 2004 19:44:05 +0000 (19:44 +0000)]
Now that all the code generators support the select instruction, and the instcombine
pass can eliminate many nasty cases of them, start generating them in the optimizers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12545 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement select.ll:test[3-6]
Chris Lattner [Tue, 30 Mar 2004 19:37:13 +0000 (19:37 +0000)]
Implement select.ll:test[3-6]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12544 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some testcases for select simplification
Chris Lattner [Tue, 30 Mar 2004 19:36:54 +0000 (19:36 +0000)]
Add some testcases for select simplification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12543 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a fairly major performance problem. If a PHI node had a constant as
Chris Lattner [Tue, 30 Mar 2004 19:10:12 +0000 (19:10 +0000)]
Fix a fairly major performance problem.  If a PHI node had a constant as
an incoming value from a block, the selector would evaluate the constant
at the TOP of the block instead of at the end of the block.  This made the
live range for the constant span the entire block, increasing register
pressure needlessly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12542 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd the select lowering pass to get initial support for select instructions
Chris Lattner [Tue, 30 Mar 2004 18:41:59 +0000 (18:41 +0000)]
Add the select lowering pass to get initial support for select instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12541 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a simple select instruction lowering pass
Chris Lattner [Tue, 30 Mar 2004 18:41:10 +0000 (18:41 +0000)]
Add a simple select instruction lowering pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12540 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some new methods
Chris Lattner [Tue, 30 Mar 2004 00:20:08 +0000 (00:20 +0000)]
Add some new methods

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12539 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDon't warn about a null live range if the Value is a ConstantIntegral.
Brian Gaeke [Mon, 29 Mar 2004 21:58:41 +0000 (21:58 +0000)]
Don't warn about a null live range if the Value is a ConstantIntegral.
Otherwise, if you're in debugging mode, you get warnings for (apparently)
every immediate constant in the function during reg. allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12538 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange how the beginnings and ends of MachineFunctions are printed. Get
Brian Gaeke [Mon, 29 Mar 2004 21:58:31 +0000 (21:58 +0000)]
Change how the beginnings and ends of MachineFunctions are printed. Get
rid of the funny cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12537 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdjust to new itf
Chris Lattner [Mon, 29 Mar 2004 20:42:49 +0000 (20:42 +0000)]
Adjust to new itf

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12534 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRelax the interface a bit
Chris Lattner [Mon, 29 Mar 2004 20:42:38 +0000 (20:42 +0000)]
Relax the interface a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12533 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMerged in RELEASE_12.
John Criswell [Mon, 29 Mar 2004 20:23:11 +0000 (20:23 +0000)]
Merged in RELEASE_12.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12532 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMerged in RELEASE_12.
John Criswell [Mon, 29 Mar 2004 20:22:30 +0000 (20:22 +0000)]
Merged in RELEASE_12.
This fixes the zlib linking problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12531 91177308-0d34-0410-b5e6-96231b3b80d8