Brian Gaeke
017eb9caf3
Add autoconf support for isStandardOutAConsole ().
...
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Chris Lattner
409ef7935c
Remove obsolete files
...
llvm-svn: 12633
2004-04-02 20:56:24 +00:00
Brian Gaeke
dec12ea71d
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.
llvm-svn: 12632
2004-04-02 20:53:37 +00:00
Brian Gaeke
b2d36cced3
Add load, store, and NOP instructions.
...
Fix up comments.
llvm-svn: 12631
2004-04-02 20:53:37 +00:00
Brian Gaeke
741518f9f6
Add support for printing pc-relative displacements of functions (as used in
...
the CALL instruction).
llvm-svn: 12630
2004-04-02 20:53:35 +00:00
Brian Gaeke
10ab592570
Add support for call instructions (0-ary only for now).
...
llvm-svn: 12629
2004-04-02 20:53:33 +00:00
Chris Lattner
0a34ab8221
Comment out debugging printouts
...
llvm-svn: 12623
2004-04-02 20:26:46 +00:00
Chris Lattner
cf5bd8a9ab
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.
llvm-svn: 12620
2004-04-02 20:24:31 +00:00
Chris Lattner
74911ffd6b
Add a new analysis
...
llvm-svn: 12619
2004-04-02 20:23:17 +00:00
Chris Lattner
3f202e3a54
Fix the obvious bug in my previous checkin
...
llvm-svn: 12618
2004-04-02 18:15:10 +00:00
Chris Lattner
bca948c99d
Implement Transforms/SimplifyCFG/return-merge.ll
...
This actually causes us to turn code like:
return C ? A : B;
into a select instruction.
llvm-svn: 12617
2004-04-02 18:13:43 +00:00
Alkis Evlogimenos
27ed33c309
Clean up code a bit.
...
llvm-svn: 12615
2004-04-02 18:11:32 +00:00
Brian Gaeke
73afcebba1
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.
llvm-svn: 12614
2004-04-02 17:52:40 +00:00
Brian Gaeke
3fb4f87195
Add support for constant select expressions. Clarify the assertion failure msg.
...
llvm-svn: 12613
2004-04-02 17:52:29 +00:00
Alkis Evlogimenos
85e007a6dc
Fix type in comments
...
llvm-svn: 12611
2004-04-02 16:02:50 +00:00
Alkis Evlogimenos
84ee10f9e1
Fix type in instruction builder instantiation
...
llvm-svn: 12610
2004-04-02 15:51:03 +00:00
Chris Lattner
0d20ff2e86
Make the verifier API more complete and useful.
...
Patch contributed by Reid Spencer
llvm-svn: 12609
2004-04-02 15:45:08 +00:00
Alkis Evlogimenos
20b074682c
Add more ADC and SBB variants
...
llvm-svn: 12607
2004-04-02 07:11:10 +00:00
Chris Lattner
2ef79bf28a
Add new function, autoconf support required tho
...
llvm-svn: 12600
2004-04-02 05:04:03 +00:00
Chris Lattner
973cb73b4f
Fix PR310 and TailDup/2004-04-01-DemoteRegToStack.llx
...
llvm-svn: 12597
2004-04-01 20:28:45 +00:00
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