Evan Cheng
306d12a520
Only propagate IsKill if the last use is a kill.
...
llvm-svn: 34878
2007-03-03 06:32:37 +00:00
Nate Begeman
7ffce4cf16
http://llvm.org/bugs/show_bug.cgi?id=1237
...
llvm-svn: 34875
2007-03-03 06:18:18 +00:00
Evan Cheng
f4e93806fe
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
9dddb88209
Mark dead def as unused.
...
llvm-svn: 34844
2007-03-02 10:43:16 +00:00
Evan Cheng
5bd925036c
Dead live-in detection bug.
...
llvm-svn: 34843
2007-03-02 10:41:15 +00:00
Evan Cheng
e2802973eb
- 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
622db28794
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
0b6492d5df
Emit eh filter info.
...
llvm-svn: 34805
2007-03-01 20:26:43 +00:00
Jim Laskey
73e3ad1b10
Collect eh filter info.
...
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Jim Laskey
5f932644e9
Lower eh filter intrinsic.
...
llvm-svn: 34802
2007-03-01 20:24:30 +00:00
Evan Cheng
7d470c14cf
Delete register scavenger when done with it.
...
llvm-svn: 34786
2007-03-01 10:23:33 +00:00
Evan Cheng
0aa68b9246
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
ad431d7a94
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
ce7f2618a9
Interface clean up.
...
llvm-svn: 34772
2007-03-01 02:25:51 +00:00
Evan Cheng
15a878202b
Interface clean up.
...
llvm-svn: 34770
2007-03-01 02:19:39 +00:00
Evan Cheng
938b4d7817
Oops.
...
llvm-svn: 34768
2007-03-01 02:05:35 +00:00
Evan Cheng
d1fa618990
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
6dd0f88e75
Chain is on second operand.
...
llvm-svn: 34759
2007-02-28 20:43:58 +00:00
Jim Laskey
6b2170fefe
Handle mix of personalities.
...
llvm-svn: 34752
2007-02-28 18:38:31 +00:00
Jim Laskey
1fea0fa316
Provide a more meaningful name.
...
llvm-svn: 34751
2007-02-28 18:37:50 +00:00
Jim Laskey
83d6baee5b
MERGE_VALUES unnecessary.
...
llvm-svn: 34750
2007-02-28 18:37:04 +00:00
Nate Begeman
7beafa54b3
Fix a typo, thanks Bill!
...
llvm-svn: 34741
2007-02-28 09:16:38 +00:00
Nate Begeman
2288ec3331
More Mach-O writer improvements.
...
llvm-svn: 34740
2007-02-28 07:40:50 +00:00
Chris Lattner
6d383bd2f1
add methods for analysis of call results and return nodes.
...
llvm-svn: 34738
2007-02-28 07:09:40 +00:00
Chris Lattner
a68a949ba5
add methods to analyze calls and formals.
...
llvm-svn: 34736
2007-02-28 06:56:37 +00:00
Chris Lattner
5a20764bbb
add a newline at end of file
...
llvm-svn: 34735
2007-02-28 06:42:11 +00:00
Evan Cheng
db591ecaa8
Make requiresRegisterScavenging determination on a per MachineFunction basis.
...
llvm-svn: 34711
2007-02-28 00:59:19 +00:00
Evan Cheng
ee2e5de4fb
MRegisterInfo disowns RegScavenger. It's immutable.
...
llvm-svn: 34706
2007-02-28 00:17:36 +00:00
Evan Cheng
ec12bdd7ea
Some more code clean up.
...
llvm-svn: 34700
2007-02-27 22:58:43 +00:00
Evan Cheng
2402ddad92
Oops.
...
llvm-svn: 34698
2007-02-27 22:10:52 +00:00
Evan Cheng
4c4e56df47
Let MRegisterInfo now owns RegScavenger.
...
llvm-svn: 34691
2007-02-27 21:10:33 +00:00
Evan Cheng
f03b87c1ff
RegScavenger interface change to make it more flexible.
...
llvm-svn: 34690
2007-02-27 21:09:48 +00:00
Chris Lattner
11a1c2113c
Minor refactoring of CC Lowering interfaces
...
llvm-svn: 34656
2007-02-27 05:13:54 +00:00
Chris Lattner
e34136f6d5
move CC Lowering stuff to its own public interface
...
llvm-svn: 34655
2007-02-27 04:43:02 +00:00
Evan Cheng
341fc2bf88
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
0fd5788077
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
65de507797
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
38db1ad2ab
track signedness of formal argument, though we have a fixme here.
...
llvm-svn: 34620
2007-02-26 02:56:58 +00:00
Jim Laskey
c2e9ceb475
Fix for PR1224.
...
llvm-svn: 34610
2007-02-25 21:43:59 +00:00
Chris Lattner
a9c561b9e6
optimize duplicate ValueMap lookups
...
llvm-svn: 34599
2007-02-25 18:40:32 +00:00
Evan Cheng
550798e5d5
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
13e48f975c
Add an assertion.
...
llvm-svn: 34596
2007-02-25 09:47:31 +00:00
Evan Cheng
189678c421
Fix a couple of bugs related IsDead back propagation during coalescing.
...
llvm-svn: 34595
2007-02-25 09:46:31 +00:00
Evan Cheng
8f3e6bfeb3
If the liveinterval of the source instruction has been extended, remove the IsKill marker.
...
llvm-svn: 34594
2007-02-25 09:41:59 +00:00
Evan Cheng
9968353d64
Only add liveinterval to livein set if it isn't assigned a stack slot.
...
llvm-svn: 34593
2007-02-25 09:39:02 +00:00
Chris Lattner
e9c4c19b27
fold trivial token factor nodes. This allows us to compile
...
test/CodeGen/X86/fp-stack-ret.ll into:
movl 4(%esp), %eax
fldl (%eax)
ret
instead of:
subl $12, %esp
movl 16(%esp), %eax
movsd (%eax), %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
by eliminating a token factor that blocked a check.
llvm-svn: 34584
2007-02-25 08:24:27 +00:00
Chris Lattner
b9f2992e38
initialize a instance variable
...
llvm-svn: 34567
2007-02-25 01:28:05 +00:00
Jim Laskey
53e71a9657
Deal with cases when MMI is not requested.
...
llvm-svn: 34556
2007-02-24 09:45:44 +00:00
Jim Laskey
10c6c6b46d
Drop unused operand.
...
llvm-svn: 34555
2007-02-24 09:44:17 +00:00
Chris Lattner
6faf9e8e97
Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219
...
llvm-svn: 34551
2007-02-24 02:09:29 +00:00