Chris Lattner
441ab4b903
Remove some assertions that are now bogus with the last patch I put in
...
llvm-svn: 12595
2004-04-01 19:21:46 +00:00
Chris Lattner
eda638b0be
Fix PR306: Loop simplify incorrectly updates dominator information
...
Testcase: LoopSimplify/2004-04-01-IncorrectDomUpdate.ll
llvm-svn: 12592
2004-04-01 19:06:07 +00:00
Chris Lattner
ef90bac3e3
Add support for select constant expressions to the CBE, fixing SIOD
...
llvm-svn: 12589
2004-04-01 05:28:26 +00:00
Chris Lattner
b6e4e5a95e
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.
llvm-svn: 12588
2004-04-01 04:06:09 +00:00
Chris Lattner
78027ca4ff
Wrap at 80 cols
...
llvm-svn: 12587
2004-04-01 04:03:27 +00:00
Chris Lattner
2e0755a058
Generate slightly smaller code, "test R, R" instead of "cmp R, 0"
...
llvm-svn: 12579
2004-03-31 22:22:36 +00:00
Chris Lattner
97e8b80649
The X86 backend no longer needs the select lowering pass.
...
llvm-svn: 12578
2004-03-31 22:03:46 +00:00
Chris Lattner
e5d60adc20
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.
llvm-svn: 12577
2004-03-31 22:03:35 +00:00
Chris Lattner
d50df93168
Add support for floating point conditional move instructions
...
llvm-svn: 12576
2004-03-31 22:02:36 +00:00
Chris Lattner
4d543b4201
Add support for FP cmoves
...
llvm-svn: 12575
2004-03-31 22:02:21 +00:00
Chris Lattner
e4fa3010db
Add FP conditional move instructions, which annoyingly have special properties
...
that require the asmwriter to be extended (printing implicit uses before the
explicit operands)
llvm-svn: 12574
2004-03-31 22:02:13 +00:00
Chris Lattner
6aaea5f86b
Add warning
...
llvm-svn: 12573
2004-03-31 22:00:30 +00:00
Chris Lattner
bfe4dd0f90
MBB::remove should not modify the iterator passed in
...
llvm-svn: 12572
2004-03-31 21:59:59 +00:00
Chris Lattner
2cc4a29665
MachineBasicBlock::remove should not modify the iterator passed in
...
llvm-svn: 12571
2004-03-31 21:59:29 +00:00
Brian Gaeke
98c323dedd
Factor out getStaticStackSize from InsertPrologCode(), so that I can more
...
easily steal it for a separate use in the reoptimizer.
llvm-svn: 12568
2004-03-31 20:58:37 +00:00
Brian Gaeke
4ca49f84ba
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.
llvm-svn: 12567
2004-03-31 19:51:00 +00:00
Chris Lattner
6ea8b0176c
Avoid TRUE and FALSE which apparently conflict with some macros on OSX
...
llvm-svn: 12566
2004-03-31 03:49:47 +00:00
Chris Lattner
1c0ddbfb7d
Fix linking of constant expr casts due to type resolution changes. With
...
this and the other patches 253.perlbmk links again.
llvm-svn: 12565
2004-03-31 02:58:28 +00:00
Chris Lattner
5a789b5e06
Add support for constant expr casts
...
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
b9cadcfcd9
Add support for reading constantexpr select instructions
...
llvm-svn: 12563
2004-03-31 02:53:59 +00:00
Chris Lattner
1d78eb6094
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
...
llvm-svn: 12562
2004-03-30 22:51:03 +00:00
Alkis Evlogimenos
45cb0b871d
Correctly update LiveVariables when an instruction changes
...
llvm-svn: 12561
2004-03-30 22:44:39 +00:00
Chris Lattner
f477746a61
Fold comparisons into select instructions, making much better code and
...
using our broad selection of movcc instructions. :)
llvm-svn: 12560
2004-03-30 22:39:09 +00:00
Chris Lattner
6c1dd729d3
Implement spill code folding for all of the conditional move instructions
...
llvm-svn: 12554
2004-03-30 21:29:47 +00:00
Chris Lattner
ff016bd6fe
Add direct support for integer select instructions, though we still don't support
...
folding compares into the select yet.
llvm-svn: 12553
2004-03-30 21:22:00 +00:00
Chris Lattner
d265077f6d
Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx
...
llvm-svn: 12551
2004-03-30 20:58:25 +00:00
Chris Lattner
57968a98df
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
llvm-svn: 12549
2004-03-30 20:18:02 +00:00
Brian Gaeke
59c80cfd05
Start cleaning up this pass so that I can debug it.
...
llvm-svn: 12548
2004-03-30 19:53:46 +00:00
Chris Lattner
145aea5c4c
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
llvm-svn: 12545
2004-03-30 19:44:05 +00:00
Chris Lattner
b6612acb18
Implement select.ll:test[3-6]
...
llvm-svn: 12544
2004-03-30 19:37:13 +00:00
Chris Lattner
95942c021a
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.
llvm-svn: 12542
2004-03-30 19:10:12 +00:00
Chris Lattner
87479998f2
Add the select lowering pass to get initial support for select instructions
...
llvm-svn: 12541
2004-03-30 18:41:59 +00:00
Chris Lattner
58a6a4d57a
Add a simple select instruction lowering pass
...
llvm-svn: 12540
2004-03-30 18:41:10 +00:00
Chris Lattner
e78381e9f1
Add some new methods
...
llvm-svn: 12539
2004-03-30 00:20:08 +00:00
Brian Gaeke
610cfaa7fd
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.
llvm-svn: 12538
2004-03-29 21:58:41 +00:00
Brian Gaeke
27be9eb265
Change how the beginnings and ends of MachineFunctions are printed. Get
...
rid of the funny cast.
llvm-svn: 12537
2004-03-29 21:58:31 +00:00
Chris Lattner
dd7ed2912e
Adjust to new itf
...
llvm-svn: 12534
2004-03-29 20:42:49 +00:00
Chris Lattner
50dc89f874
Handle -0.0 correctly
...
llvm-svn: 12530
2004-03-29 19:51:24 +00:00
Chris Lattner
7f5d56b43a
Add a bunch of methods that should have been added a long time ago.
...
llvm-svn: 12526
2004-03-29 02:37:53 +00:00
Chris Lattner
27cbe8d690
Add another check
...
llvm-svn: 12525
2004-03-29 00:29:36 +00:00
Chris Lattner
44acd09520
Fix an assertion
...
Contributed by Reid Spencer
llvm-svn: 12524
2004-03-29 00:17:20 +00:00
Chris Lattner
874db50b32
Make error message a bit nicer.
...
Contributed by Reid Spencer
llvm-svn: 12523
2004-03-29 00:16:01 +00:00
Chris Lattner
b34cfff038
Add two methods which have been needed for a long time: Type::get(Un)signedVersion
...
llvm-svn: 12522
2004-03-26 21:43:22 +00:00
Chris Lattner
d191e5625c
X % -1 == X % 1 == 0
...
llvm-svn: 12520
2004-03-26 16:11:24 +00:00
Chris Lattner
e15fb6ac61
Two changes:
...
#1 is to unconditionally strip constantpointerrefs out of
instruction operands where they are absolutely pointless and inhibit
optimization. GRRR!
#2 is to implement InstCombine/getelementptr_const.ll
llvm-svn: 12519
2004-03-25 22:59:29 +00:00
Chris Lattner
ecb0efb6e5
Minor efficiency improvement, finegrainify namespacification
...
llvm-svn: 12517
2004-03-25 22:56:03 +00:00
Chris Lattner
f3867b270c
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
...
it was "reachable". Cute.
llvm-svn: 12515
2004-03-19 23:34:33 +00:00
Chris Lattner
078f97b50d
Teach the optimizer to delete zero sized alloca's (but not mallocs!)
...
llvm-svn: 12507
2004-03-19 06:08:10 +00:00
Chris Lattner
4e7ea3671c
Fix PR299: [Sparc] Code generator asserts on alloc of zero size type
...
llvm-svn: 12504
2004-03-19 04:21:43 +00:00
Chris Lattner
b8f179cb9b
Malloc doesn't kill a load. This patch need not go into 1.2 though.
...
llvm-svn: 12500
2004-03-18 17:01:26 +00:00