Chris Lattner
7eb61104dc
Bugfixes: inc/dec don't set the carry flag!
...
llvm-svn: 12687
2004-04-06 03:36:57 +00:00
Chris Lattner
8cdbb1fe84
Improve code for passing constant longs as arguments to function calls.
...
For example, on this instruction:
call void %test(long 1234)
Instead of this:
mov %EAX, 1234
mov %ECX, 0
mov DWORD PTR [%ESP], %EAX
mov DWORD PTR [%ESP + 4], %ECX
call test
We now emit this:
mov DWORD PTR [%ESP], 1234
mov DWORD PTR [%ESP + 4], 0
call test
llvm-svn: 12686
2004-04-06 03:23:00 +00:00
Chris Lattner
2738d6d4a4
Emit more efficient 64-bit operations when the RHS is a constant, and one
...
of the words of the constant is zeros. For example:
Y = and long X, 1234
now generates:
Yl = and Xl, 1234
Yh = 0
instead of:
Yl = and Xl, 1234
Yh = and Xh, 0
llvm-svn: 12685
2004-04-06 03:15:53 +00:00
Chris Lattner
bdbedf9523
Fix typeo
...
llvm-svn: 12684
2004-04-06 02:13:25 +00:00
Chris Lattner
606639ed1a
Add support for simple immediate handling to long instruction selection.
...
This allows us to handle code like 'add long %X, 123456789012' more efficiently.
llvm-svn: 12683
2004-04-06 02:11:49 +00:00
Chris Lattner
e84f12a165
The sbb instructions really ARE sbb's, not adc's
...
llvm-svn: 12682
2004-04-06 02:02:11 +00:00
Chris Lattner
0808f5daa5
Implement negation of longs efficiently. For this testcase:
...
long %test(long %X) {
%Y = sub long 0, %X
ret long %Y
}
We used to generate:
test:
sub %ESP, 4
mov DWORD PTR [%ESP], %ESI
mov %ECX, DWORD PTR [%ESP + 8]
mov %ESI, DWORD PTR [%ESP + 12]
mov %EAX, 0
mov %EDX, 0
sub %EAX, %ECX
sbb %EDX, %ESI
mov %ESI, DWORD PTR [%ESP]
add %ESP, 4
ret
Now we generate:
test:
mov %EAX, DWORD PTR [%ESP + 4]
mov %EDX, DWORD PTR [%ESP + 8]
neg %EAX
adc %EDX, 0
neg %EDX
ret
llvm-svn: 12681
2004-04-06 01:48:06 +00:00
Chris Lattner
56dcdcf638
Minor tweak to avoid an extra reg-reg copy that the register allocator has to eliminate
...
llvm-svn: 12680
2004-04-06 01:25:33 +00:00
Chris Lattner
42cf317fca
Two changes:
...
* In promote32, if we can just promote a constant value, do so instead of
promoting a constant dynamically.
* In visitReturn inst, actually USE the promote32 argument that takes a
Value*
The end result of this is that we now generate this:
test:
mov %EAX, 0
ret
instead of...
test:
mov %AX, 0
movzx %EAX, %AX
ret
for:
ushort %test() {
ret ushort 0
}
llvm-svn: 12679
2004-04-06 01:21:00 +00:00
Chris Lattner
d2c51f2cc3
Merge the code generator miscompilation code into the optimizer miscompilation
...
code. This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues. :)
llvm-svn: 12678
2004-04-05 22:58:16 +00:00
Chris Lattner
0442a87f47
Make a method public
...
llvm-svn: 12677
2004-04-05 22:01:48 +00:00
Chris Lattner
f856e42795
Minor cleanups, remove some old debug code
...
llvm-svn: 12676
2004-04-05 21:37:55 +00:00
Chris Lattner
5c943cebf1
Refactor and genericize code
...
llvm-svn: 12675
2004-04-05 21:37:38 +00:00
Chris Lattner
a2ecf0cf75
lli no longer takes the -quiet option!
...
llvm-svn: 12674
2004-04-05 20:28:41 +00:00
Chris Lattner
d154cb1717
Do not mangle intrinsics in any way!
...
llvm-svn: 12673
2004-04-05 20:17:53 +00:00
Chris Lattner
5ac19e9daf
Make full use of the Mangler interface to simplify code
...
llvm-svn: 12671
2004-04-05 19:31:02 +00:00
Chris Lattner
fb8a43c586
Sparc don't got not "sqrtl", bum bum bum
...
llvm-svn: 12670
2004-04-05 19:05:15 +00:00
Misha Brukman
21355cfcba
Kill warnings during an optimized compile where assert() disappears.
...
llvm-svn: 12669
2004-04-05 19:00:46 +00:00
Chris Lattner
8b61b8c936
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
...
llvm-svn: 12668
2004-04-05 18:46:55 +00:00
Chris Lattner
30ff883603
New testcase for PR312
...
llvm-svn: 12667
2004-04-05 18:46:33 +00:00
Chris Lattner
c92af54ed5
Fix a bug in yesterdays checkins which broke siod. siod is a great testcase! :)
...
llvm-svn: 12659
2004-04-05 16:02:41 +00:00
Chris Lattner
6c961339a3
Fix InstCombine/2004-04-04-InstCombineReplaceAllUsesWith.ll
...
llvm-svn: 12658
2004-04-05 02:10:19 +00:00
Chris Lattner
f94bcf3c85
New testcase that crashes the instcombine pass. Dominance properties have
...
no meaning if the code is not reachable.
llvm-svn: 12657
2004-04-05 02:01:32 +00:00
Chris Lattner
8ba9dea7a1
PR82 is finally fixed!
...
llvm-svn: 12656
2004-04-05 01:43:08 +00:00
Chris Lattner
61dcf6709b
Minor change
...
llvm-svn: 12655
2004-04-05 01:31:50 +00:00
Chris Lattner
262af8c7d8
Update getelementptr instruction description
...
llvm-svn: 12654
2004-04-05 01:30:49 +00:00
Chris Lattner
9236135e8f
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
f78d930837
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
Auto-upgrade .ll files that use ubytes to index into structures to use uint's.
llvm-svn: 12652
2004-04-05 01:30:04 +00:00
Chris Lattner
ada730740b
Implement support for a new LLVM 1.3 bytecode format, which uses uint's
...
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.
llvm-svn: 12651
2004-04-05 01:27:26 +00:00
Chris Lattner
1b6512141d
Be more restrictive with the index types we allow for sequential types
...
llvm-svn: 12650
2004-04-05 01:25:21 +00:00
Chris Lattner
a266f6dc29
PR305 is now fixed
...
llvm-svn: 12649
2004-04-05 00:40:55 +00:00
Chris Lattner
eb1caeca2a
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
c69fd63e82
In the perhaps not-to-distant future, we might support gep instructions that
...
have non-long indices for sequential types. In order to avoid trying to figure
out how the v9 backend works, we'll just hack it in the preselection pass.
llvm-svn: 12647
2004-04-04 20:44:05 +00:00
Chris Lattner
27dff42330
Adjust to new interface
...
llvm-svn: 12646
2004-04-04 19:47:06 +00:00
Chris Lattner
81e7a8ffc5
Support iteration over constant instructions
...
llvm-svn: 12645
2004-04-04 19:46:54 +00:00
Chris Lattner
5c053bfa99
Adjust to new gep_type_iterator prototypes.
...
llvm-svn: 12644
2004-04-04 17:30:06 +00:00
Chris Lattner
b25ac02112
Remove a bunch of cruft that was used to be backwards compatible with the last
...
prerelease format for LLVM bytecode files. Now we only are compatible with
LLVM 1.0+.
llvm-svn: 12643
2004-04-03 23:43:42 +00:00
Chris Lattner
5eab55b846
Allow for use of arbitrary iterator types...
...
llvm-svn: 12642
2004-04-03 23:29:11 +00:00
Chris Lattner
3ccb7f2275
Implement test/Regression/Transforms/GCSE/undefined_load.ll
...
llvm-svn: 12641
2004-04-03 00:45:16 +00:00
Chris Lattner
2d01bb096b
New testcase
...
llvm-svn: 12640
2004-04-03 00:44:56 +00:00
Chris Lattner
0329ff0b87
Add a break in the default case
...
llvm-svn: 12639
2004-04-03 00:43:03 +00:00
Brian Gaeke
017eb9caf3
Add autoconf support for isStandardOutAConsole ().
...
llvm-svn: 12638
2004-04-02 21:26:04 +00:00
Brian Gaeke
8a82884f63
Regenerated using autoheader-2.57.
...
llvm-svn: 12637
2004-04-02 21:26:03 +00:00
Brian Gaeke
cafcc6b677
Regenerated using autoconf-2.57.
...
llvm-svn: 12636
2004-04-02 21:26:02 +00:00
Brian Gaeke
49d8340cb8
check for isatty function
...
llvm-svn: 12635
2004-04-02 21:06:44 +00:00
Chris Lattner
f592eff643
Remove obsolete analyses
...
llvm-svn: 12634
2004-04-02 20:56:33 +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