Alkis Evlogimenos
f410424283
Pull Interval class out of LiveIntervals.
...
llvm-svn: 13910
2004-05-30 07:46:27 +00:00
Alkis Evlogimenos
2598a63586
When spilling an register, introduce a new temporary for each of its
...
spills. This allows for more flexibility when allocating registers for
spill code.
llvm-svn: 13907
2004-05-30 07:24:39 +00:00
Brian Gaeke
2281858cf6
Fix typo in head-of-file comment.
...
llvm-svn: 13903
2004-05-30 03:33:48 +00:00
Alkis Evlogimenos
516e16441b
Add method to assign stack slot to virtual register without creating a
...
new one.
llvm-svn: 13895
2004-05-29 20:38:05 +00:00
Alkis Evlogimenos
c5923ac8b1
Add grow() member that grows the maps when the number of virtual
...
registers in the function has changed.
llvm-svn: 13893
2004-05-29 19:03:29 +00:00
Alkis Evlogimenos
d50a5109ff
Remove defs vector from live intervals.
...
llvm-svn: 13892
2004-05-29 16:18:57 +00:00
Tanya Lattner
a275dfcce4
updates to ModuloSched
...
llvm-svn: 13881
2004-05-28 20:14:12 +00:00
Tanya Lattner
8c5d9dcc42
Adding scheduling class.
...
llvm-svn: 13783
2004-05-26 06:27:36 +00:00
Tanya Lattner
bd1298d574
Updating my cvs versions. THis is still in progress and much will be changed.
...
llvm-svn: 13782
2004-05-26 06:27:18 +00:00
Tanya Lattner
7cf16701f7
Moved MachineBasicBlock deconstructor to cpp file and removed it from LeakDetector to fix memory leak bug.
...
llvm-svn: 13718
2004-05-24 07:14:35 +00:00
Tanya Lattner
aabaaec037
Added MachineFunction parent* to MachineBasicBlock. Customized ilist template
...
to set the parent when a MachineBasicBlock is added to a MachineFunction.
llvm-svn: 13716
2004-05-24 06:11:51 +00:00
Chris Lattner
f38d51ea42
Eliminate an explicit use of the LLVM basic block, using getParent instead,
...
which simplifies the code
llvm-svn: 13707
2004-05-24 03:44:52 +00:00
Tanya Lattner
55477a5af1
Changed clone to be const.
...
Changed copy constructor to set parent, prev, and next pointers to null.
llvm-svn: 13706
2004-05-24 03:14:18 +00:00
Tanya Lattner
e755fc6689
Fixed up my changes to add support for cloning Machine Instructions.
...
llvm-svn: 13665
2004-05-23 20:58:02 +00:00
Tanya Lattner
2848065a29
Adding support to clone MachineInstr
...
llvm-svn: 13661
2004-05-23 19:35:12 +00:00
Chris Lattner
f29acd5214
Fix a really nasty bug from my changes on Monday to PHIElim. These changes
...
broke obsequi and a lot of other things. It all boiled down to MBB being
overloaded in an inner scope and me confusing it with the one in the outer
scope. Ugh!
llvm-svn: 13517
2004-05-12 21:47:57 +00:00
Brian Gaeke
79c7de0723
Start NextMBBNumber out at zero.
...
llvm-svn: 13515
2004-05-12 21:35:23 +00:00
Brian Gaeke
6009468edd
Add non-const MachineBasicBlock::getParent() accessor method.
...
MBBs start out as #-1. When a MBB is added to a MachineFunction, it
gets the next available unique MBB number. If it is removed from a
MachineFunction, it goes back to being #-1.
llvm-svn: 13514
2004-05-12 21:35:22 +00:00
Chris Lattner
279d8e8e2d
Switch this from using an std::map to using a DenseMap. This speeds up
...
phi-elimination from 0.6 to 0.54s on kc++.
llvm-svn: 13454
2004-05-10 19:17:36 +00:00
Chris Lattner
3fb5488b5e
Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
...
in the basic block being processed. This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).
llvm-svn: 13453
2004-05-10 19:06:37 +00:00
Chris Lattner
8b57a31ff4
Now that we use an ilist of machine instructions, iterators are more robust
...
than before. Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block. This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are
still much more important gains to come.
llvm-svn: 13452
2004-05-10 18:47:18 +00:00
Chris Lattner
b37490a331
Patch to fix PR337. Make sure to mark all aliased physical registers as used
...
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
llvm-svn: 13444
2004-05-10 05:12:43 +00:00
Tanya Lattner
57339f67d6
Updating my versions of ModuloScheduling in cvs. Still not complete.
...
llvm-svn: 13424
2004-05-08 16:12:10 +00:00
Alkis Evlogimenos
76be543a64
Add required header
...
llvm-svn: 13417
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
6022169db7
Remove unneeded header
...
llvm-svn: 13416
2004-05-08 03:49:35 +00:00
Chris Lattner
5f18bec9e6
numeric_limits::infinity() apparently does not work on all systems. As a
...
workaround, use the C HUGE_VAL macro instead.
llvm-svn: 13377
2004-05-06 16:25:59 +00:00
Chris Lattner
c09a94de9e
Operate on the Machine CFG instead of on the LLVM CFG
...
llvm-svn: 13302
2004-05-01 21:24:39 +00:00
Chris Lattner
769668c09a
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
...
use MachineBasicBlocks. To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.
llvm-svn: 13301
2004-05-01 21:24:24 +00:00
Brian Gaeke
1b07a2282a
Include SparcV9RegInfo.h instead of TargetRegInfo.h. This serves as a bit of
...
documentation that this module needs to be made independent of the
register file description of the current target.
llvm-svn: 13125
2004-04-23 18:15:46 +00:00
Brian Gaeke
bc25b3b28a
Implement emitWordAt() for the debug emitter and the file printer emitter. (I
...
am not so sure about the file printer emitter, but the debug emitter change
should be harmless.)
llvm-svn: 13117
2004-04-23 17:11:13 +00:00
Alkis Evlogimenos
40d8a6802b
Fix bug introduced in previous commit.
...
llvm-svn: 12872
2004-04-12 20:26:39 +00:00
Alkis Evlogimenos
38984637d9
Correctly compute spill weights
...
llvm-svn: 12869
2004-04-12 17:39:20 +00:00
Alkis Evlogimenos
bb422833e4
Print def lists a bit more compactly
...
llvm-svn: 12866
2004-04-12 15:57:58 +00:00
Alkis Evlogimenos
f66a23d573
Add definition list to each live interval.
...
llvm-svn: 12791
2004-04-09 18:07:57 +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
Alkis Evlogimenos
45cb0b871d
Correctly update LiveVariables when an instruction changes
...
llvm-svn: 12561
2004-03-30 22:44:39 +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
Alkis Evlogimenos
81c6957eab
Make the set of fixed (preallocated) intervals be a fixed superset of
...
unhandled + handled. So unhandled is now including all fixed intervals
and fixed intervals never changes when processing a function.
llvm-svn: 12462
2004-03-17 00:48:59 +00:00
Chris Lattner
5541c82383
Fix PR294
...
llvm-svn: 12425
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos
ff9482b664
Change MRegisterInfo::foldMemoryOperand to return the folded
...
instruction to make the API more flexible.
llvm-svn: 12386
2004-03-14 07:19:51 +00:00
Alkis Evlogimenos
0e0433a791
Spill explicit physical register defs as well.
...
llvm-svn: 12260
2004-03-09 08:35:13 +00:00
Alkis Evlogimenos
02e8f14c6a
As I wrote in the docs, simple is the default spiller :-)
...
llvm-svn: 12189
2004-03-06 23:08:44 +00:00
Alkis Evlogimenos
467364b706
Add simple spiller.
...
llvm-svn: 12188
2004-03-06 22:38:29 +00:00
Brian Gaeke
aa96ff7926
Make MachineOperand's value named 'contents'. Make really, really sure
...
it is always completely initialized and copied.
Also, fix up many comments and asserts.
llvm-svn: 12100
2004-03-03 19:07:27 +00:00
Alkis Evlogimenos
c4ad8080f7
Add a spiller option to llc. A simple spiller will come soon. When we get CFG in the machine code represenation a global spiller will also be possible. Also document the linear scan register allocator but mark it as experimental for now.
...
llvm-svn: 12062
2004-03-01 23:18:15 +00:00
Alkis Evlogimenos
64e76a0d43
Add the long awaited memory operand folding support for linear scan
...
llvm-svn: 12058
2004-03-01 20:05:10 +00:00
Brian Gaeke
b78f8498f0
TargetCacheInfo has been removed; its only uses were to propagate a constant
...
(16) into certain areas of the SPARC V9 back-end. I'm fairly sure the US IIIi's
dcache has 32-byte lines, so I'm not sure where the 16 came from. However, in
the interest of not breaking things any more than they already are, I'm going
to leave the constant alone.
llvm-svn: 12043
2004-03-01 06:43:29 +00:00
Tanya Lattner
27c08f11bf
Adding new Modulo Scheduling graph files.
...
llvm-svn: 12031
2004-03-01 02:50:57 +00:00
Tanya Lattner
55de04447c
Removing old graph files with new graph files that I wrote. Updated ModuloScheduling pass, but still in progress.
...
llvm-svn: 12030
2004-03-01 02:50:01 +00:00