Jeff Cohen
b622c11f77
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
47206667c0
fold away addc nodes when we know there cannot be a carry-out.
...
llvm-svn: 34913
2007-03-04 20:40:38 +00:00
Chris Lattner
2dcc6e7f58
generalize
...
llvm-svn: 34910
2007-03-04 20:08:45 +00:00
Chris Lattner
e2e13caeb2
canonicalize constants to the RHS of addc/adde. If nothing uses the carry out of
...
addc, turn it into add.
This allows us to compile:
long long test(long long A, unsigned B) {
return (A + ((long long)B << 32)) & 123;
}
into:
_test:
movl $123, %eax
andl 4(%esp), %eax
xorl %edx, %edx
ret
instead of:
_test:
xorl %edx, %edx
movl %edx, %eax
addl 4(%esp), %eax ;; add of zero
andl $123, %eax
ret
llvm-svn: 34909
2007-03-04 20:03:15 +00:00
Chris Lattner
362621c7ae
eliminate some ops if they have an undef RHS
...
llvm-svn: 34908
2007-03-04 20:01:46 +00:00
Reid Spencer
b8825b8c04
Remove unneeded header file.
...
llvm-svn: 34903
2007-03-04 04:41:04 +00:00
Chris Lattner
ca401aac31
Fix CodeGen/Generic/fpowi-promote.ll and PR1239
...
llvm-svn: 34893
2007-03-03 23:43:21 +00:00
Chris Lattner
567b9254cd
Add an expand action for ISD label which just deletes the label.
...
This "fixes" PR1238.
llvm-svn: 34890
2007-03-03 19:21:38 +00:00
Evan Cheng
d74cb0e194
Only propagate IsKill if the last use is a kill.
...
llvm-svn: 34878
2007-03-03 06:32:37 +00:00
Nate Begeman
323cf8f602
http://llvm.org/bugs/show_bug.cgi?id=1237
...
llvm-svn: 34875
2007-03-03 06:18:18 +00:00
Evan Cheng
3fd728596e
Watch out for cases like this:
...
entry (0x8b056f0, LLVM BB @0x8b01b30, ID#0):
Live Ins: %r0 %r1 %r2 %r3
%reg1032 = tMOVrr %r3<kill>
%reg1033 = tMOVri8 1
%reg1034 = tMOVri8 0
tCMPi8 %reg1029<kill>, 0
tBcc mbb<entry,0x8b06a10>, 0
Successors according to CFG: 0x8b06980 0x8b06a10
entry (0x8b06980, LLVM BB @0x8b01b30, ID#12):
Predecessors according to CFG: 0x8b056f0
%reg1036 = tMOVrr %reg1034<kill>
Successors according to CFG: 0x8b06a10
entry (0x8b06a10, LLVM BB @0x8b01b30, ID#13):
Predecessors according to CFG: 0x8b056f0 0x8b06980
%reg1024<dead> = tMOVrr %reg1030<kill>
...
reg1030 and r1 have already been joined. When reg1024 and reg1030 are joined,
r1 live range from function entry to the tMOVrr instruction are dead. Eliminate
r1 from the livein set of the entry BB, not the BB where the copy is.
llvm-svn: 34866
2007-03-03 02:18:00 +00:00
Evan Cheng
155ede21e0
Mark dead def as unused.
...
llvm-svn: 34844
2007-03-02 10:43:16 +00:00
Evan Cheng
9d615d1e70
Dead live-in detection bug.
...
llvm-svn: 34843
2007-03-02 10:41:15 +00:00
Evan Cheng
6605c5dbee
- Keep track all def and uses of stack slot available in register.
...
- Available value use may be deleted (e.g. noop move).
llvm-svn: 34841
2007-03-02 08:52:00 +00:00
Evan Cheng
08f2f0d145
Invalidate last use of a reused register if the use is a deleted noop copy.
...
llvm-svn: 34839
2007-03-02 05:41:42 +00:00
Jim Laskey
82af5943d1
Emit eh filter info.
...
llvm-svn: 34805
2007-03-01 20:26:43 +00:00
Jim Laskey
6458e6acb9
Collect eh filter info.
...
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Jim Laskey
d5453d7b56
Lower eh filter intrinsic.
...
llvm-svn: 34802
2007-03-01 20:24:30 +00:00
Evan Cheng
105fb1e0dd
Delete register scavenger when done with it.
...
llvm-svn: 34786
2007-03-01 10:23:33 +00:00
Evan Cheng
27bc565497
Add a version of FindUnusedReg that restrict search to a specific set of registers.
...
llvm-svn: 34784
2007-03-01 08:56:24 +00:00
Evan Cheng
d6450ba1dc
A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register.
...
llvm-svn: 34773
2007-03-01 02:27:30 +00:00
Evan Cheng
31215d1395
Interface clean up.
...
llvm-svn: 34772
2007-03-01 02:25:51 +00:00
Evan Cheng
428eaa0059
Interface clean up.
...
llvm-svn: 34770
2007-03-01 02:19:39 +00:00
Evan Cheng
9be123c568
Oops.
...
llvm-svn: 34768
2007-03-01 02:05:35 +00:00
Evan Cheng
8a703ad4b6
Track all joined registers and eliminate unneeded kills after all joining are done.
...
llvm-svn: 34767
2007-03-01 02:03:03 +00:00
Jim Laskey
644af6b68f
Chain is on second operand.
...
llvm-svn: 34759
2007-02-28 20:43:58 +00:00
Jim Laskey
c46bf3577d
Handle mix of personalities.
...
llvm-svn: 34752
2007-02-28 18:38:31 +00:00
Jim Laskey
c114990526
Provide a more meaningful name.
...
llvm-svn: 34751
2007-02-28 18:37:50 +00:00
Jim Laskey
cf465fcebc
MERGE_VALUES unnecessary.
...
llvm-svn: 34750
2007-02-28 18:37:04 +00:00
Nate Begeman
37dc4b5bb3
Fix a typo, thanks Bill!
...
llvm-svn: 34741
2007-02-28 09:16:38 +00:00
Nate Begeman
e0232ec706
More Mach-O writer improvements.
...
llvm-svn: 34740
2007-02-28 07:40:50 +00:00
Chris Lattner
74bb92902e
add methods for analysis of call results and return nodes.
...
llvm-svn: 34738
2007-02-28 07:09:40 +00:00
Chris Lattner
e74744143f
add methods to analyze calls and formals.
...
llvm-svn: 34736
2007-02-28 06:56:37 +00:00
Chris Lattner
b5582bf984
add a newline at end of file
...
llvm-svn: 34735
2007-02-28 06:42:11 +00:00
Evan Cheng
e8af69632f
Make requiresRegisterScavenging determination on a per MachineFunction basis.
...
llvm-svn: 34711
2007-02-28 00:59:19 +00:00
Evan Cheng
589ba3964b
MRegisterInfo disowns RegScavenger. It's immutable.
...
llvm-svn: 34706
2007-02-28 00:17:36 +00:00
Evan Cheng
a7e4b60b85
Some more code clean up.
...
llvm-svn: 34700
2007-02-27 22:58:43 +00:00
Evan Cheng
8a8dc04e7e
Oops.
...
llvm-svn: 34698
2007-02-27 22:10:52 +00:00
Evan Cheng
e50a994cba
Let MRegisterInfo now owns RegScavenger.
...
llvm-svn: 34691
2007-02-27 21:10:33 +00:00
Evan Cheng
51f54640de
RegScavenger interface change to make it more flexible.
...
llvm-svn: 34690
2007-02-27 21:09:48 +00:00
Chris Lattner
9f059194a7
Minor refactoring of CC Lowering interfaces
...
llvm-svn: 34656
2007-02-27 05:13:54 +00:00
Chris Lattner
dc3adc83e7
move CC Lowering stuff to its own public interface
...
llvm-svn: 34655
2007-02-27 04:43:02 +00:00
Evan Cheng
ca25c0ee0d
forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.
...
llvm-svn: 34649
2007-02-27 01:58:48 +00:00
Evan Cheng
bdec83e4d2
Joining an interval with a dead copy instruction. Shorten the live range to the last use.
...
llvm-svn: 34645
2007-02-26 21:37:37 +00:00
Chris Lattner
fce448f856
Fold (sext (truncate x)) more aggressively, by avoiding creation of a
...
sextinreg if not needed. This is useful in two cases: before legalize,
it avoids creating a sextinreg that will be trivially removed. After legalize
if the target doesn't support sextinreg, the trunc/sext would not have been
removed before.
llvm-svn: 34621
2007-02-26 03:13:59 +00:00
Chris Lattner
ab5d0ac02c
track signedness of formal argument, though we have a fixme here.
...
llvm-svn: 34620
2007-02-26 02:56:58 +00:00
Jim Laskey
14059d958a
Fix for PR1224.
...
llvm-svn: 34610
2007-02-25 21:43:59 +00:00
Chris Lattner
8c504cf9a0
optimize duplicate ValueMap lookups
...
llvm-svn: 34599
2007-02-25 18:40:32 +00:00
Evan Cheng
38fd9b074f
A couple of more places where a register liveness has been extended and its last kill should be updated accordingly.
...
llvm-svn: 34597
2007-02-25 09:51:27 +00:00
Evan Cheng
fb2333a333
Add an assertion.
...
llvm-svn: 34596
2007-02-25 09:47:31 +00:00