Chris Lattner
ef375052c6
Rename the opCode instance variable to Opcode
...
llvm-svn: 11348
2004-02-12 16:09:53 +00:00
Chris Lattner
bda81f88b7
This field is never read
...
llvm-svn: 11346
2004-02-12 16:04:49 +00:00
Alkis Evlogimenos
b755d35fd2
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Brian Gaeke
4d67c9770d
getOpCode() --> getOpcode().
...
llvm-svn: 11339
2004-02-12 01:34:05 +00:00
Chris Lattner
db2c8941a5
Add #include
...
llvm-svn: 11285
2004-02-10 21:18:55 +00:00
Chris Lattner
37e040ee03
Do not use MachineOperand::isVirtualRegister either!
...
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Chris Lattner
9d0a4e63b1
Eliminate users of MachineOperand::isPhysicalRegister
...
llvm-svn: 11278
2004-02-10 20:41:10 +00:00
Brian Gaeke
c86ce8b134
Move InstrSchedule's iterator begin/end methods inline.
...
llvm-svn: 11239
2004-02-09 18:42:46 +00:00
Brian Gaeke
60268b265f
Make SchedGraph::dump() use SchedGraphNodeCommon's const_iterator
...
instead of randomly groping about inside its outEdges array.
Make SchedGraph::addDummyEdges() use getNumOutEdges() instead of
outEdges.size().
Get rid of ifdefed-out code in SchedGraph::buildGraph().
llvm-svn: 11238
2004-02-09 18:42:05 +00:00
Chris Lattner
95c21b04da
Another nice speedup for the register allocator. This time, we replace
...
the Virt2PhysRegMap std::map with an std::vector. This speeds up the
register allocator another (almost) 40%, from .72->.45s in a release build
of LLC on 253.perlbmk.
llvm-svn: 11219
2004-02-09 02:12:04 +00:00
Chris Lattner
9fb6056f1f
Ugh, perform an optimization that GCC should be able to do itself. This
...
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk
llvm-svn: 11217
2004-02-09 01:43:23 +00:00
Chris Lattner
b665065e6d
Only do stuff for the REAL number of physical registers we have, not 1024.
...
This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for
the first/second pass respectively.
llvm-svn: 11216
2004-02-09 01:35:21 +00:00
Chris Lattner
c49e77cecd
Change the PhysRegsUsed map into a dense array. Seeing that this is a mapping
...
from physical registers, and they are always dense, it makes sense to not have
a ton of RBtree overhead. This change speeds up regalloclocal about ~30% on
253.perlbmk, from .35s -> .27s in the JIT (in LLC, it goes from .74 -> .55).
Now live variable analysis is the slowest codegen pass. Of course it doesn't
help that we have to run it twice, because regalloclocal doesn't update it,
but even if it did it would be the slowest pass (now it's just the 2x slowest
pass :(
llvm-svn: 11215
2004-02-09 01:26:13 +00:00
Alkis Evlogimenos
59bb9d69c7
Increase code clarity.
...
llvm-svn: 11151
2004-02-06 18:08:18 +00:00
Alkis Evlogimenos
2aa7703205
Eliminate uneeded lookups by passing a Virt2PhysMap::iterator instead
...
of the virtual register to certain functions.
llvm-svn: 11143
2004-02-06 03:15:40 +00:00
Alkis Evlogimenos
f01a26ceaa
Change live interval representation. Machine instructions now have two
...
slots each. As a concequence they get numbered as 0, 2, 4 and so
on. The first slot is used for operand uses and the second for
defs. Here's an example:
0: A = ...
2: B = ...
4: C = A + B ;; last use of A
The live intervals should look like:
A = [1, 5)
B = [3, x)
C = [5, y)
llvm-svn: 11141
2004-02-05 22:55:25 +00:00
Alkis Evlogimenos
3dd0f57349
We don't need to scan the blocks that we are live-in on every
...
access. Rather we only have to do it on the creation of the interval.
llvm-svn: 11135
2004-02-05 20:45:40 +00:00
Tanya Lattner
0221566368
Added missing include.
...
llvm-svn: 11129
2004-02-05 05:04:39 +00:00
Alkis Evlogimenos
676e5b8997
Modify the two address instruction pass to remove the duplicate
...
operand of the instruction and thus simplify the register allocation.
llvm-svn: 11124
2004-02-04 22:17:40 +00:00
Alkis Evlogimenos
5e78d4bd75
When an instruction like: A += B had both A and B virtual registers
...
spilled, A was loaded from its stack location twice. This fixes the bug.
llvm-svn: 11093
2004-02-03 01:13:07 +00:00
Alkis Evlogimenos
e128cb3295
Revert changes. Will implement this using a different set of primitives
...
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos
a4fab12df8
Fix debugging output.
...
llvm-svn: 11088
2004-02-02 22:00:32 +00:00
Alkis Evlogimenos
3f268a9996
Correctly update def/use information for modified machine operands.
...
llvm-svn: 11087
2004-02-02 21:56:40 +00:00
Alkis Evlogimenos
dfef24298e
Should be more careful. The previously applied change made all counts
...
outside of loops = 0.
llvm-svn: 11085
2004-02-02 20:29:57 +00:00
Alkis Evlogimenos
1825f30a3a
Create an object for tracking physical register usage. This will look
...
much better when I get rid of the reserved registers.
llvm-svn: 11066
2004-02-02 07:30:36 +00:00
Alkis Evlogimenos
586dc51262
Change weight array into a vector and make it as big as the number of
...
registers (not as the max number of registers).
Change toSpill from a std::set into a std::vector<bool>.
Use the reverse iterator adapter to do a reverse scan of allocatable
registers.
llvm-svn: 11061
2004-02-01 20:13:26 +00:00
Alkis Evlogimenos
b2ea4389ca
Use std::map::count() instead of std::map::find() != std::map::end()
...
where appropriate.
llvm-svn: 11060
2004-02-01 18:39:53 +00:00
Alkis Evlogimenos
eabb1b1bfa
Change string for joined intervals.
...
llvm-svn: 11057
2004-02-01 16:13:05 +00:00
Alkis Evlogimenos
e9d1aa31fc
Change xor to ^.
...
llvm-svn: 11054
2004-02-01 08:19:25 +00:00
Chris Lattner
2e497b5e42
Fix a bug in a recent checkin
...
llvm-svn: 11050
2004-02-01 05:25:07 +00:00
Alkis Evlogimenos
107cf3892c
Missed one silly assert :-)
...
llvm-svn: 11048
2004-02-01 02:21:31 +00:00
Alkis Evlogimenos
a7459c76aa
Simplify joinIntervals() code.
...
llvm-svn: 11047
2004-02-01 02:18:31 +00:00
Alkis Evlogimenos
612a35f2a4
Use MRegisterInfo::isPhysicalRegister and
...
MRegisterInfo::isVirtualRegister.
llvm-svn: 11045
2004-02-01 01:27:01 +00:00
Alkis Evlogimenos
9559cebebf
Apply final part of Chris' patch.
...
llvm-svn: 11040
2004-01-31 23:48:47 +00:00
Alkis Evlogimenos
656870703f
Be a little smarter on the way we handle physical register defs.
...
llvm-svn: 11038
2004-01-31 23:13:30 +00:00
Chris Lattner
0ea56952d4
Finegrainify namespacification, use new MRegisterInfo::isVirtualRegister
...
method
llvm-svn: 11037
2004-01-31 21:27:19 +00:00
Chris Lattner
bff56dc518
Fix, correctly this time, the computation of the return value
...
Fix a spello
Tighten up the assertion checking
No functionality changes.
llvm-svn: 11036
2004-01-31 21:21:43 +00:00
Chris Lattner
05b7fef02f
* Fix incorrect computation of the runOnMachineFunction return value
...
* Turn a bunch of instance variables into automatic variables
llvm-svn: 11035
2004-01-31 21:14:04 +00:00
Chris Lattner
b0addcc1b0
Remove unneeded #includes
...
Move Passes.h (which defines the interface to this file) to the top.
Move statistics to the top of the file.
Add a comment
llvm-svn: 11034
2004-01-31 21:07:15 +00:00
Alkis Evlogimenos
d1ec5f36ee
Merge safe parts from last night's buggy commit. These do not break
...
any test cases :-)
llvm-svn: 11032
2004-01-31 19:59:32 +00:00
Alkis Evlogimenos
ef63827238
Optimize liveAt() and overlaps(). We now use a binary search instead
...
of a linear search to find the first range for comparisons. This cuts
down the linear scan register allocator running time by a factor of 3
in 254.perlbmk and by a factor of 2.2 in 176.gcc.
llvm-svn: 11030
2004-01-31 16:54:54 +00:00
Alkis Evlogimenos
b9df133d67
Revert last night's changes as they broke some tests. Will remerge parts of the patch.
...
llvm-svn: 11029
2004-01-31 14:37:41 +00:00
Alkis Evlogimenos
c0db519832
Several performance enhancements and cleanups from Chris.
...
Simplification of LiveIntervals::Interval::overlaps() and addition of
examples to overlaps() and liveAt() to make them clearer.
llvm-svn: 11028
2004-01-31 04:56:07 +00:00
Chris Lattner
32ec75c4ef
Finegrainify namespacification
...
Implement LiveVariables::getIndexMachineBasicBlock
llvm-svn: 11018
2004-01-30 22:08:53 +00:00
Brian Gaeke
9cf840250b
Give clients of MachineFunctionPrinter the ability to specify a banner and
...
choose an ostream.
llvm-svn: 11016
2004-01-30 21:53:46 +00:00
Alkis Evlogimenos
2a8df1739b
Fix failing test cases with joined live intervals. It turns out that
...
when joining we need to check if we overlap with the second interval
or any of its aliases.
Also make joining intervals the default.
llvm-svn: 10973
2004-01-23 13:37:51 +00:00
Alkis Evlogimenos
b4745bda05
Add option to join live intervals. Two intervals are joined if there
...
is a move between two registers, at least one of the registers is
virtual and the two live intervals do not overlap.
This results in about 40% reduction in intervals, 30% decrease in the
register allocators running time and a 20% increase in peephole
optimizations (mainly move eliminations).
The option can be enabled by passing -join-liveintervals where
appropriate.
llvm-svn: 10965
2004-01-22 23:08:45 +00:00
Alkis Evlogimenos
8d8c76a064
Remove unneeded check. An interval in active, by definition overlaps
...
with the current one.
llvm-svn: 10959
2004-01-22 20:07:18 +00:00
Alkis Evlogimenos
abdbf4a288
Improve debugging output. Remove unneeded virtReg->0 mapping when
...
virtReg lives on the stack. Now a virtual register has an entry in the
virtual->physical map or the virtual->stack slot map but never in
both.
llvm-svn: 10958
2004-01-22 19:24:43 +00:00
Alkis Evlogimenos
a1bb8618c3
Revert previous change. The code was correct...
...
llvm-svn: 10957
2004-01-22 19:17:52 +00:00
Alkis Evlogimenos
448e6f3353
Fix incorrect negatives in LiveIntervals::Interval::liveAt().
...
llvm-svn: 10956
2004-01-22 18:33:50 +00:00
Tanya Lattner
291f28ee4e
Moved iterators around.
...
llvm-svn: 10926
2004-01-20 17:51:13 +00:00
Tanya Lattner
33079fad04
Moved iterators to common file.
...
llvm-svn: 10925
2004-01-20 17:49:42 +00:00
Alkis Evlogimenos
7f300c9ea6
Handle printing of intervals that are not assign to any physical
...
register yet (2nd try).
llvm-svn: 10896
2004-01-16 20:33:13 +00:00
Alkis Evlogimenos
e03ef29452
Handle printing of intervals that are not assign to any physical
...
register yet.
llvm-svn: 10895
2004-01-16 20:29:42 +00:00
Alkis Evlogimenos
38f0f867b3
Fold open interval ends handling into
...
LiveIntervals::Interval::expiredAt() and simplify regalloc code.
llvm-svn: 10894
2004-01-16 20:17:05 +00:00
Alkis Evlogimenos
ed3c0a91b0
Add asserts to previous change.
...
llvm-svn: 10893
2004-01-16 16:23:23 +00:00
Alkis Evlogimenos
61db3621bd
Use a list instead of a vector to store intervals. This will be needed
...
when we join intervals and one of the two will need to be removed.
llvm-svn: 10892
2004-01-16 16:06:59 +00:00
Alkis Evlogimenos
52d1db4841
Properly update #intervals statistic.
...
llvm-svn: 10847
2004-01-14 10:44:29 +00:00
Alkis Evlogimenos
c4225e2f09
Fix bug in LiveIntervals::Interval::overlaps and
...
LiveIntervals::Interval::liveAt. Both were considering the live ranges
closed in the end, when they are actually open.
llvm-svn: 10835
2004-01-14 00:20:09 +00:00
Alkis Evlogimenos
9a9f749eec
Improve debugging output.
...
llvm-svn: 10834
2004-01-14 00:09:36 +00:00
Alkis Evlogimenos
34a4e7b161
Fix miscomputation of live intervals. The catch is that registers can
...
be dead at the defining instruction but can only be killed in
subsequent ones.
llvm-svn: 10833
2004-01-13 22:26:14 +00:00
Alkis Evlogimenos
c73c31a496
Remove allocatable registers vector. It is already provided by
...
LiveVariables.
llvm-svn: 10830
2004-01-13 22:10:43 +00:00
Alkis Evlogimenos
e1afcec06f
Cleanup debugging output.
...
llvm-svn: 10824
2004-01-13 21:53:20 +00:00
Alkis Evlogimenos
a2965727e3
Fix output of live intervals to show correctly its closed, open
...
ranges, i.e. [a,b)
llvm-svn: 10822
2004-01-13 21:17:47 +00:00
Alkis Evlogimenos
060861d7eb
Remove unneeded check (with the recent change in live variables a use
...
of a physical register is always dominated by a def).
llvm-svn: 10821
2004-01-13 21:16:25 +00:00
Alkis Evlogimenos
7ffa2a50f3
Indentation and whitespace cleanups.
...
llvm-svn: 10820
2004-01-13 20:42:08 +00:00
Alkis Evlogimenos
767111188a
Fix bug introduced by previous commit: check if fixed intervals
...
overlap before adding their spill weight.
llvm-svn: 10819
2004-01-13 20:37:01 +00:00
Alkis Evlogimenos
1a7b3c80d7
Correctly compute live variable information for physical registers
...
when an implicitely defined register is later used by an alias. For example:
call foo
%reg1024 = mov %AL
The call implicitely defines EAX but only AL is used. Before this fix
no information was available on AL. Now EAX and all its aliases except
AL get defined and die at the call instruction whereas AL lives to be
killed by the assignment.
llvm-svn: 10813
2004-01-13 06:24:30 +00:00
Alkis Evlogimenos
ef7c077e63
Make LiveVariables::HandlePhysRegUse and
...
LiveVariables::HandlePhysRegDef private they use information that is
not in memory when LiveVariables finishes the analysis.
Also update the TwoAddressInstructionPass to not use this interface.
llvm-svn: 10755
2004-01-11 09:18:45 +00:00
Chris Lattner
4771545c89
Remove use of llvm/CodeGen/InstrSelection.h
...
llvm-svn: 10749
2004-01-10 19:16:26 +00:00
Chris Lattner
1eeb1b1c04
Finegrainify namespacification.
...
This should get hunked over to the Sparc backend, along with
MachineCodeForInstruction and a bunch of files in include/llvm/Codegen,
but those battles will have to wait for a later time.
llvm-svn: 10731
2004-01-09 06:30:18 +00:00
Chris Lattner
ebe5eeb151
Move InstrSelection into lib/Target/Sparc, as it's sparc specific
...
llvm-svn: 10730
2004-01-09 06:24:06 +00:00
Chris Lattner
9bd7a783b9
Move lib/Codegen/RegAlloc into lib/Target/Sparc, as it is sparc specific
...
llvm-svn: 10728
2004-01-09 06:17:12 +00:00
Alkis Evlogimenos
cbe72d0381
Add a separate list of fixed intervals. This improves the running time
...
of the register allocator as follows:
before after
mesa 2.3790 1.5994
vpr 2.6008 1.2078
gcc 1.9840 0.5273
mcf 0.2569 0.0470
eon 1.8468 1.4359
twolf 0.9475 0.2004
burg 1.6807 1.3300
lambda 1.2191 0.3764
Speedups range anyware from 30% to over 400% :-)
llvm-svn: 10712
2004-01-07 09:20:58 +00:00
Alkis Evlogimenos
7bba96c90b
Minor cleanups.
...
llvm-svn: 10711
2004-01-07 05:31:12 +00:00
Alkis Evlogimenos
752173bede
Remove declared but undefined method.
...
llvm-svn: 10710
2004-01-07 02:29:33 +00:00
Alkis Evlogimenos
8aea74016b
Change implementation of LiveIntervals::overlap(). This results in a
...
30-50% decrease in running time of the linear scan register allocator.
llvm-svn: 10707
2004-01-07 01:45:58 +00:00
Alkis Evlogimenos
63f378bb39
Remove simple coalescing.
...
llvm-svn: 10695
2004-01-05 08:24:57 +00:00
Chris Lattner
bd827343af
fix warning
...
llvm-svn: 10692
2004-01-05 05:42:17 +00:00
Alkis Evlogimenos
496be157cc
Currently we cannot handle two-address instructions of the form:
...
A = B op C where A == C, but this cannot really occur in practice
because of SSA form. Add an assert to check that just to be safe.
llvm-svn: 10682
2004-01-05 02:25:45 +00:00
Alkis Evlogimenos
e74dd531f7
Update description.
...
llvm-svn: 10681
2004-01-04 23:09:24 +00:00
Chris Lattner
c37577eb9f
Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering
...
implementation from the TargetMachine directly.
llvm-svn: 10636
2003-12-28 21:23:38 +00:00
Alkis Evlogimenos
8157eb7140
Reserve ECX and EDI instead of EBX and EDI. Since EBX is a callee
...
saved register it has a longer free range than ECX (which is defined
every time there is a fnuction call) which makes ECX a better register
to reserve.
llvm-svn: 10635
2003-12-28 18:03:52 +00:00
Alkis Evlogimenos
fc01aac4d8
Add coalescing to register allocator. A hint is added to each interval
...
which denotes the register we would like to be assigned to (virtual or
physical). In register allocation, if this hint exists and we can map
it to a physical register (it is either a physical register or it is a
virtual register that already got assigned to a physical one) we use
that register if it is available instead of a random one in the free
pool.
llvm-svn: 10634
2003-12-28 17:58:18 +00:00
Chris Lattner
c487970d6b
Whoops, don't try to lower non intrinsic calls
...
llvm-svn: 10632
2003-12-28 09:53:23 +00:00
Chris Lattner
66fb20d2d3
Use the intrinsic lowering functionality
...
llvm-svn: 10626
2003-12-28 09:43:35 +00:00
Chris Lattner
068ac4236d
Move into the VMCore library
...
llvm-svn: 10623
2003-12-28 08:30:20 +00:00
Chris Lattner
57ff7c242c
Implement the default implementation of the intrinsic lowering class
...
llvm-svn: 10621
2003-12-28 08:19:41 +00:00
Chris Lattner
a8c942c188
finegrainify namespacification
...
minor cleanups
llvm-svn: 10619
2003-12-28 07:59:53 +00:00
Alkis Evlogimenos
597e2f3501
Improve debugging output when choosing a register to spill.
...
llvm-svn: 10604
2003-12-24 18:53:31 +00:00
Alkis Evlogimenos
2c947a4fa0
Do a separate pass to compute spill weights because doing it inline
...
with live intervals was missing registers that were used before they
were defined (in the arbitrary order live intervals numbers
instructions).
llvm-svn: 10603
2003-12-24 15:44:53 +00:00
Alkis Evlogimenos
ca57dd1089
Change the way free regusters are computed and perform better
...
allocation in the presence of preallocated intervals.
llvm-svn: 10595
2003-12-23 18:00:33 +00:00
Alkis Evlogimenos
10de430568
Fix crash when compiling twolf.
...
llvm-svn: 10584
2003-12-22 13:54:29 +00:00
Alkis Evlogimenos
7062ccbc85
Remove verifyIntervals() since it doesn't actually work right now.
...
llvm-svn: 10570
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos
4401d0a7a3
Change weight into a float so that we can take into account the
...
nesting level when computing it. Right now the allocator uses:
w = sum_over_defs_uses( 10 ^ nesting level );
llvm-svn: 10569
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos
4f98b79ef0
Add support for inactive intervals. This effectively reuses registers
...
for live ranges that fall into assigned registers' holes.
llvm-svn: 10566
2003-12-21 05:43:40 +00:00
Chris Lattner
461a62626a
Add a new target-independent machine code freeing pass
...
llvm-svn: 10560
2003-12-20 10:20:58 +00:00
Chris Lattner
d476049d19
* Finegrainify namespacification
...
* Move sparc specific code out of generic code
* Eliminate the getOffset() method which made INVALID_FRAME_OFFSET
necessary, which made pulling in MAX_INT as a sentinal necessary.
llvm-svn: 10553
2003-12-20 09:17:07 +00:00
Alkis Evlogimenos
9181e0ab5b
Remove TwoAddressInstruction from the public headers and add an ID
...
instead, since this pass doesn't expose any state to its users.
llvm-svn: 10520
2003-12-18 22:40:24 +00:00
Chris Lattner
c984af2771
Prune some #includes
...
Add a statistic for # reloads
llvm-svn: 10518
2003-12-18 20:25:31 +00:00
Alkis Evlogimenos
f6e9dd4942
Modify linear scan register allocator to use the two-address
...
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.
llvm-svn: 10515
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
9bb0ad1a37
Fix bug in reserved registers. DH actually aliases DX and EDX which
...
are not reserved registers.
llvm-svn: 10514
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
48d20cb328
Modify local register allocator to use the two-address instruction pass.
...
llvm-svn: 10513
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
90aeecae42
Add TwoAddressInstructionPass to handle instructions that have two or
...
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:
a = b op c
and transforms it into:
a = b
a = a op c
and also preserves live variables.
llvm-svn: 10512
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
befef566f6
Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
...
llvm-svn: 10511
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
382bfbffeb
When a variable is killed and redifined in a basic block only one
...
killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.
llvm-svn: 10510
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
8e2fcc7d79
Handle multiple virtual register definitions gracefully.
...
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.
llvm-svn: 10509
2003-12-18 08:48:48 +00:00
Alkis Evlogimenos
657eb40294
Change preserve all claim to just preserve live variables and phielimination.
...
llvm-svn: 10469
2003-12-15 04:55:38 +00:00
Alkis Evlogimenos
29127b8825
Change interface of MachineOperand as follows:
...
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
b) add isUse(), isDef()
c) rename opHiBits32() to isHiBits32(),
opLoBits32() to isLoBits32(),
opHiBits64() to isHiBits64(),
opLoBits64() to isLoBits64().
This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.
llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
d58f58b351
When reserving a preallocated register spill the aliases of this
...
register too.
llvm-svn: 10450
2003-12-13 11:58:10 +00:00
Alkis Evlogimenos
f84f86137b
Ignore non-allocatable physical registers in live interval analysis.
...
llvm-svn: 10449
2003-12-13 11:11:02 +00:00
Alkis Evlogimenos
18bf6b5ad7
Expire any active intervals left when register allocation is done.
...
llvm-svn: 10448
2003-12-13 05:50:19 +00:00
Alkis Evlogimenos
225fc9c6db
Add instruction numbers to debugging output.
...
llvm-svn: 10447
2003-12-13 05:48:57 +00:00
Alkis Evlogimenos
2a41fcbef3
Handle explicit physical register defs.
...
llvm-svn: 10445
2003-12-13 05:26:39 +00:00
Alkis Evlogimenos
6e511754e5
Remove unecessary if statements when looping on ImplicitDefs.
...
llvm-svn: 10444
2003-12-13 01:20:58 +00:00
John Criswell
ea48d9cd13
This appears to fix Bug 172 and does not break any other feature tests or
...
regression tests.
llvm-svn: 10388
2003-12-10 22:51:41 +00:00
Alkis Evlogimenos
f3373f7bc9
Make assertion stricter. Since the source operands are allocated at
...
this point, the second operand must be a physical register (it cannot
be a virtual one).
llvm-svn: 10292
2003-12-05 11:31:39 +00:00
Alkis Evlogimenos
711ebbdd57
Fix bug in register spilling when a preallocated live range overlaps a
...
potential register assignment.
llvm-svn: 10291
2003-12-05 11:17:55 +00:00
Alkis Evlogimenos
229c2b9181
Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
...
llvm-svn: 10290
2003-12-05 10:38:28 +00:00
Alkis Evlogimenos
52ec591c66
Sort live intervals by increasing start point.
...
llvm-svn: 10289
2003-12-05 10:32:01 +00:00
Alkis Evlogimenos
6f8151e202
Improve debugging output and clean up some code.
...
llvm-svn: 10288
2003-12-04 03:57:28 +00:00
Alkis Evlogimenos
c1409f46b6
Print instructions before register allocation is performed. Also fix
...
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.
llvm-svn: 10272
2003-11-30 23:40:39 +00:00
Alkis Evlogimenos
36630268ae
Remove "numReloaded" statistic.
...
llvm-svn: 10268
2003-11-30 05:15:36 +00:00
Alkis Evlogimenos
6627a32ff9
Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
...
llvm-svn: 10103
2003-11-20 03:32:25 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
612254327c
Fix problems linking against the reoptimizer; _llvm_regAllocState must have
...
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.
llvm-svn: 9858
2003-11-10 07:12:01 +00:00
Brian Gaeke
490bf81152
Operand numbers are now ints. Save the register allocation of the value
...
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().
llvm-svn: 9842
2003-11-10 00:05:26 +00:00
Misha Brukman
6667a74caf
Let's not forget about our friends -- Constant Pool indices.
...
llvm-svn: 9750
2003-11-06 00:04:11 +00:00
Chris Lattner
1370c57a42
Do not use a class before it is defined.
...
Be gcc 3.4 clean
llvm-svn: 9727
2003-11-05 06:25:06 +00:00
Brian Gaeke
8dadbe31dc
Update verifySavedState()'s comment, so that it reflects its current
...
status. In doFinalization(), skip over external functions, just like
Anand's mapping info does.
llvm-svn: 9703
2003-11-04 22:42:41 +00:00
Brian Gaeke
f641ebe313
Add comments.
...
llvm-svn: 9697
2003-11-04 18:25:56 +00:00
Brian Gaeke
29d56dd004
Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
...
implementing verifySavedState().
In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.
llvm-svn: 9617
2003-10-30 21:21:33 +00:00
Brian Gaeke
e78feb1c40
Make AllocState an enum.
...
Move the stringifying method for that enum into class AllocInfo.
llvm-svn: 9616
2003-10-30 21:21:22 +00:00
Brian Gaeke
04e6824a3f
Publicize the type of FnAllocState.
...
Prototype option to save state in a global instead of as a Constant in
the Module. (Turned off, for now, with the on/off switch welded in the off
position. You get the idea.)
llvm-svn: 9500
2003-10-24 21:21:58 +00:00
Chris Lattner
d09d070385
standardize command line option names
...
llvm-svn: 9496
2003-10-24 20:05:58 +00:00
Brian Gaeke
665123fb99
Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
...
llvm-svn: 9452
2003-10-23 20:39:18 +00:00
Brian Gaeke
6d9f7ff0df
Move AllocInfo structure to a private AllocInfo.h header file.
...
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
AllocInfos to LLVM Constants.
llvm-svn: 9451
2003-10-23 20:32:55 +00:00
Brian Gaeke
98fbdd344e
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
...
llvm-svn: 9450
2003-10-23 20:32:02 +00:00
Brian Gaeke
ede0b08125
New file, containing AllocInfo structure.
...
llvm-svn: 9449
2003-10-23 20:31:51 +00:00
Misha Brukman
966d423f89
* Eliminate `using' directive
...
* Fix order of #includes
* Make code layout more consistent
* Eliminate extraneous whitespace and comment-lines
llvm-svn: 9433
2003-10-23 18:10:02 +00:00
Misha Brukman
97911fb3bb
* Fix order of #include files
...
* Doxygen-ify method comments
llvm-svn: 9432
2003-10-23 18:06:27 +00:00
Misha Brukman
c1b01b50fb
* Order #includes as per style guide
...
* Doxygen-ify comments
* Make code layout more consistent
llvm-svn: 9431
2003-10-23 18:03:50 +00:00
Misha Brukman
765938c377
* Use C++ style comments instead of C-style
...
* Make file description more readable
* Make code layout more consistent, include comment in assert so it's visible
during execution if it hits
llvm-svn: 9430
2003-10-23 18:02:47 +00:00
Misha Brukman
2c119cec9b
* Eliminate `using' directive
...
* Make code layout more consistent
llvm-svn: 9427
2003-10-23 17:43:17 +00:00
Misha Brukman
22e5a5848b
Make code layout more consistent.
...
llvm-svn: 9426
2003-10-23 17:39:37 +00:00
Brian Gaeke
916b2522f9
Change the type of FnAllocState.
...
llvm-svn: 9388
2003-10-22 20:44:29 +00:00
Brian Gaeke
5952eddbfb
Don't worry about converting each function's reg. alloc. state into One Big
...
Constant early on, because we can do it in doFinalization.
Tighten up a comment.
llvm-svn: 9387
2003-10-22 20:44:23 +00:00
Brian Gaeke
4e1aade603
Add prototype for verifySavedState().
...
llvm-svn: 9386
2003-10-22 20:23:13 +00:00
Brian Gaeke
08fc8bcce4
Doxygenify method comments.
...
Try to improve method comments a little.
Get rid of some excess whitespace; put braces on previous line when possible.
Add stub for method to verify the work of saveState().
llvm-svn: 9385
2003-10-22 20:22:53 +00:00
John Criswell
4746befea3
Added LLVM copyright notice.
...
llvm-svn: 9324
2003-10-21 15:29:18 +00:00
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
87843f87b8
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
...
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
eab4a2d0d1
#include vector which we will need here soon
...
llvm-svn: 9144
2003-10-15 22:09:32 +00:00
Chris Lattner
f2ed60c0b7
Decrease usage of use_size()
...
llvm-svn: 9135
2003-10-15 16:48:29 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Misha Brukman
9fcbd8d16f
* Doxygenified comments
...
* Wrap code at 80 columns
* Ordered includes according to LLVM style guide
llvm-svn: 9020
2003-10-10 17:41:32 +00:00
Alkis Evlogimenos
74568bc9d4
Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
...
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:
if (const unsigned* AS = TID.ImplicitDefs) {
for (int i = 0; AS[i]; ++i) {
// use AS[i]
}
}
was changed to:
for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
// use *AS
}
llvm-svn: 8960
2003-10-08 05:20:08 +00:00
Alkis Evlogimenos
a37b58ce09
Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
...
llvm-svn: 8819
2003-10-02 16:57:49 +00:00
Chris Lattner
b0860d88c2
include passes.h which defines the interface this file exposes
...
llvm-svn: 8793
2003-09-30 20:13:59 +00:00
Brian Gaeke
8b15e271a5
Update head-of-file comment.
...
llvm-svn: 8699
2003-09-24 18:16:23 +00:00
Brian Gaeke
1c9978c999
Untabify tabs in stuff I've recently added.
...
Check in my register allocator state-saving code.
llvm-svn: 8698
2003-09-24 18:08:54 +00:00
Brian Gaeke
dee6b30348
Use getRegClassID() instead of getRegClass()->getID(), since it's there.
...
Shorten the markSuggestedColorUsable method.
Add a switch for saving reg. alloc. state (coming soon).
llvm-svn: 8697
2003-09-24 17:50:28 +00:00
Brian Gaeke
9ef4c789e3
Remove some unused methods of class IGNode.
...
llvm-svn: 8696
2003-09-24 04:29:52 +00:00
Chris Lattner
afea820122
Move getAnalysisUsage method from header to .cpp file. Add a normal file
...
header comment
llvm-svn: 8679
2003-09-23 15:13:04 +00:00
Brian Gaeke
1fdcd32b79
Use C++ math header instead of C version.
...
llvm-svn: 8648
2003-09-21 03:57:37 +00:00
Brian Gaeke
4013dbc6b0
Erase now-unused prototypes.
...
llvm-svn: 8647
2003-09-21 02:51:00 +00:00
Brian Gaeke
0478925a82
Rearrange #includes ... since there are fewer now I guess it's a win.
...
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)
llvm-svn: 8646
2003-09-21 02:50:21 +00:00
Brian Gaeke
605ed35234
Standardize the names of include guards.
...
llvm-svn: 8645
2003-09-21 02:31:37 +00:00
Brian Gaeke
84114e1b72
Standardize the names of include guards.
...
Remove more excess whitespace.
llvm-svn: 8644
2003-09-21 02:31:25 +00:00
Brian Gaeke
92f4b04f66
Standardize the names of include guards.
...
Fix typos in file header comment.
llvm-svn: 8643
2003-09-21 02:31:15 +00:00
Brian Gaeke
4f86f6e887
I tried to standardize the formatting and tidy up the huge amount of
...
excess whitespace a little. Also improved some comments.
llvm-svn: 8642
2003-09-21 02:24:09 +00:00
Brian Gaeke
6dc46fce5a
Convert PhyRegAlloc into a proper pass.
...
PhyRegAlloc.cpp:
Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
by PhyRegAlloc.h.
Merge class RegisterAllocator into class PhyRegAlloc.
Simplify & move ctor, dtor to PhyRegAlloc.h.
Make some of PhyRegAlloc's reference members into pointer members,
so they can be more easily messed with.
MarkAllocatedRegs() becomes a member method, with fewer args.
PhyRegAlloc.h:
Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
TargetRegInfo forward.
Give AddedInstrns the obvious clear() method.
Make some of PhyRegAlloc's reference members into pointer members,
so they can be more easily messed with.
Add prototype for markAllocatedRegs().
Remove unused inline void constructLiveRanges().
llvm-svn: 8641
2003-09-21 01:23:46 +00:00
Misha Brukman
9708959677
Fixed spelling.
...
llvm-svn: 8588
2003-09-17 21:34:23 +00:00
Brian Gaeke
d0729bd289
Fix typo in comment. Take out some random whitespace.
...
(Partial merge from my working file)
llvm-svn: 8564
2003-09-16 15:38:05 +00:00
Brian Gaeke
5ef624ead8
Edit comment for accuracy
...
llvm-svn: 8562
2003-09-16 15:36:50 +00:00
Vikram S. Adve
724b2d6f36
Add flag to control whether or not delay slots are filled during
...
instruction scheduling (this is off by default).
llvm-svn: 8553
2003-09-16 05:55:15 +00:00
Brian Gaeke
d7bc2c066d
Fix typos in comments.
...
llvm-svn: 8523
2003-09-15 05:28:42 +00:00
Misha Brukman
629711a7c3
Fixed spelling and grammar.
...
llvm-svn: 8489
2003-09-11 22:34:13 +00:00
Chris Lattner
5520e4dc30
Don't build dead directories
...
llvm-svn: 8308
2003-09-01 20:34:15 +00:00
Chris Lattner
a685c382b1
Remove dead library makefile
...
llvm-svn: 8304
2003-09-01 20:29:43 +00:00
Chris Lattner
80c84d29b1
Remove makefile for dead library
...
llvm-svn: 8303
2003-09-01 20:26:52 +00:00
Chris Lattner
049f0b8b37
LiveRange.h is now in lib/CodeGen/RegAlloc
...
llvm-svn: 8299
2003-09-01 20:17:13 +00:00
Chris Lattner
74e93a318b
LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
...
llvm-svn: 8297
2003-09-01 20:12:17 +00:00
Chris Lattner
a591134169
PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
...
llvm-svn: 8296
2003-09-01 20:09:04 +00:00
Chris Lattner
e3fcb37a20
Move IGNode from public include directory to here. Minor cleanups like adding std:: namespace qualifiers
...
llvm-svn: 8295
2003-09-01 20:05:47 +00:00
John Criswell
588d65ae68
Fixed two double free bugs that caused llc to segfault or run forever.
...
llvm-svn: 8191
2003-08-28 21:43:17 +00:00
Tanya Lattner
7fc76b7377
Removing README
...
llvm-svn: 8180
2003-08-28 17:17:59 +00:00
Tanya Lattner
f7a56c2596
Putting my revised version of ModuloScheduling in cvs. This is not complete...
...
llvm-svn: 8179
2003-08-28 17:12:14 +00:00
Tanya Lattner
7ce05c067d
Moved index into BB to common graph class because its needed by ModuloSchedGraph.
...
llvm-svn: 8174
2003-08-28 15:30:40 +00:00
Tanya Lattner
2c6c16288a
Added/removed header file
...
llvm-svn: 8160
2003-08-27 15:12:24 +00:00
Tanya Lattner
78d4730ae6
*** empty log message ***
...
llvm-svn: 8153
2003-08-27 02:42:58 +00:00
Tanya Lattner
f172cf418d
First version of SchedGraph common class and refactoring of SchedGraph.
...
llvm-svn: 8148
2003-08-25 22:42:20 +00:00
Chris Lattner
82e85c8c5f
Fix bug: Jello/2003-08-23-RegisterAllocatePhysReg.ll
...
llvm-svn: 8095
2003-08-23 23:49:42 +00:00
Misha Brukman
cda7f97dbb
The word dependent' has no
a'.
...
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner
491f944115
Fix spello
...
llvm-svn: 8029
2003-08-21 22:05:57 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
972c03e264
Fix bug: Jello/2003-08-15-AllocaAssertion.ll
...
llvm-svn: 7916
2003-08-17 18:01:15 +00:00
Brian Gaeke
797d0f0aeb
Fix typo in comment
...
llvm-svn: 7906
2003-08-15 21:19:25 +00:00
Chris Lattner
b2ff3ba7df
Remove uses of the NonCopyable class, to make the doxygen output look better
...
llvm-svn: 7880
2003-08-15 05:20:06 +00:00
Chris Lattner
d5ff87cb9b
rename selection directory and library to SelectionDAG
...
llvm-svn: 7877
2003-08-15 04:55:22 +00:00
Chris Lattner
d76432ee48
Add a bunch of new node types, etc
...
llvm-svn: 7875
2003-08-15 04:53:16 +00:00
Brian Gaeke
4651096037
Factory methods for function passes now return type FunctionPass *.
...
llvm-svn: 7839
2003-08-14 06:09:32 +00:00
Brian Gaeke
af3bc2b895
Factory methods for function passes now return type FunctionPass *.
...
Get rid of RegisterLLC, which can't handle FunctionPasses anyway.
llvm-svn: 7836
2003-08-14 06:04:49 +00:00
Brian Gaeke
77c65be59e
Factory methods for FunctionPasses now return type FunctionPass *.
...
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Chris Lattner
8b83fcfaa6
Mapping directory no longer exists
...
llvm-svn: 7801
2003-08-13 02:37:24 +00:00
Chris Lattner
c6ea2085bd
Obsolete file
...
llvm-svn: 7799
2003-08-13 02:27:13 +00:00
Vikram S. Adve
3862c570bc
For instructions in a delay slot of another instruction,
...
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot. Just assert that instead.
llvm-svn: 7796
2003-08-12 22:22:24 +00:00
Chris Lattner
f40b9fb6c2
Build the SelectionDAG library
...
llvm-svn: 7718
2003-08-11 14:57:48 +00:00
Chris Lattner
45414456b3
Initial checkin of SelectionDAG implementation. This is still rough and
...
unfinished
llvm-svn: 7717
2003-08-11 14:57:33 +00:00
Vikram S. Adve
bc05294ada
Fix assertion in MachineInstr::substituteValue().
...
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Chris Lattner
5a778ec126
Use a new local data structure instead of the MachineInstr::regsUsed set
...
llvm-svn: 7621
2003-08-05 22:11:13 +00:00
Chris Lattner
937abf2262
Add a map
...
llvm-svn: 7620
2003-08-05 22:09:31 +00:00
Chris Lattner
a38b57808a
Minor cleanups
...
llvm-svn: 7619
2003-08-05 22:03:27 +00:00
Chris Lattner
18b0b92033
Physical registers no longer live in the regsUsed set for each machine instr
...
llvm-svn: 7618
2003-08-05 21:55:58 +00:00
Chris Lattner
a826c8d485
Do not insert physical regsiters into the regsUsed set
...
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
Chris Lattner
b047a0d449
All callers of these methods actually wanted them to preserve the flags,
...
so get rid of the def/use parameters that were getting passed in.
**** This now changes the semantics of these methods to preserve the flags,
not clobber them!
llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Chris Lattner
297f7d2451
Fix bugs handling ESP in alloca references
...
llvm-svn: 7591
2003-08-05 04:13:58 +00:00
Chris Lattner
6fece1bf61
Revert previous change, and be really anal about what physical registers can do.
...
llvm-svn: 7588
2003-08-05 00:49:09 +00:00
Chris Lattner
0e8197ad06
Don't bother calculating info unless its needed. May reduce number of stack slots created.
...
llvm-svn: 7584
2003-08-04 23:42:37 +00:00
Chris Lattner
8934560bd3
* Fix spelling of 'necessary'
...
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx
llvm-svn: 7583
2003-08-04 23:36:39 +00:00
Chris Lattner
5dca2ea4bc
Simplify code, eliminating the need for the X86 isVoid target instr flag
...
llvm-svn: 7534
2003-08-03 21:51:45 +00:00
Chris Lattner
77691b2c54
Set debug types
...
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner
eba995d624
Remove using decl
...
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner
a18bb98cf5
Wrap at 80 columns
...
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner
1baa706ab7
Move DEBUG to Debug.h
...
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Vikram S. Adve
1414fba288
All constant-evaluation code now unified into
...
TargetInstrInfo::ConvertConstantToIntType().
llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve
b58f52ab45
1. Bug fix: Don't use branch operand reg. as temp. reg. when
...
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
2. Bug fix: Delete the delay slot instr, not the branch instr, when
moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
it is now machine-independent.
llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve
42005e62b0
Add const version of getLiveRangeForValue().
...
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve
52859278d1
Code to insert caller-saves moved here from SparcRegInfo: it is now
...
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).
llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Chris Lattner
92dfc1ed32
Making this code const-correct would be a pain, so I'll hack it.
...
llvm-svn: 7350
2003-07-26 23:29:51 +00:00
Chris Lattner
2d6049baaf
Const correctness fixes
...
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner
e39696972d
Be const correct
...
llvm-svn: 7348
2003-07-26 23:23:41 +00:00
Chris Lattner
792286a084
Hrm, another necesary one :(
...
llvm-svn: 7347
2003-07-26 23:22:19 +00:00
Chris Lattner
ecc0501a97
Remove #include
...
llvm-svn: 7342
2003-07-26 23:01:04 +00:00
Chris Lattner
9224631d6b
Remove extraneous #includes
...
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Vikram S. Adve
57eb4ab6bc
(1) Change the way unused regs. are marked and found to consider regType
...
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
llvm-svn: 7329
2003-07-25 21:06:09 +00:00
Vikram S. Adve
714fee31fd
Remove unused field. Change the way unused regs. are marked and
...
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).
llvm-svn: 7327
2003-07-25 21:00:13 +00:00
Chris Lattner
9c569f48a0
Remove unnecessary casts
...
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner
c1049acba1
Random cleanups
...
llvm-svn: 7247
2003-07-23 14:59:40 +00:00
Chris Lattner
67138b2c59
Remove using decl
...
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Vikram S. Adve
d8b600cb85
Values stored in CallArgsDescriptor cannot be const.
...
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve
b1496585b6
isMarkedForSpill() should be const.
...
llvm-svn: 7155
2003-07-10 19:45:28 +00:00
Vikram S. Adve
6aa3abf7fa
Change interface to MachineInstr::substituteValue to specify more precisely
...
which args can be substituted: defsOnly, defsAndUses or usesOnly.
llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Vikram S. Adve
0b23c58179
Print out all neighbors in interference graph, not just higher-numbered ones.
...
llvm-svn: 7153
2003-07-10 19:43:33 +00:00
Vikram S. Adve
00f3778923
Several fixes to handling of int CC register:
...
(1) An int CC live range must be spilled if there are any interferences,
even if no other "neighbour" in the interf. graph has been allocated
that reg. yet. This is actually true of any class with only one reg!
(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
be spilled so that the machine-independent spill code doesn't have to
make the machine-dependent decision of which CC name to use based on
operand type: %xcc or %icc. (These are two halves of the same
register.)
(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
These should never have been the same, and this is necessary now for #2 .
(4) All RDCCR and WRCCR instructions are directly generated with the
phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
deal with this.
llvm-svn: 7152
2003-07-10 19:42:55 +00:00
Vikram S. Adve
d7b18ee501
Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
...
llvm-svn: 7112
2003-07-06 20:33:21 +00:00
Vikram S. Adve
293af7edb6
Minor beautification: fold a couple of lines of code.
...
llvm-svn: 7054
2003-07-02 01:24:00 +00:00