Alkis Evlogimenos
d8e8396e33
Fix typo.
...
llvm-svn: 14720
2004-07-09 11:25:27 +00:00
Alkis Evlogimenos
57839c592a
Improve code comments.
...
llvm-svn: 14719
2004-07-09 11:10:00 +00:00
Alkis Evlogimenos
51dda289a7
Disable coalescing.
...
llvm-svn: 14655
2004-07-07 02:03:12 +00:00
Alkis Evlogimenos
e0c8d140a9
Do not crash when joining two intervals of registers of different
...
classes: just ignore that move. Thanks to Vladimir Prus who found the
bug!
llvm-svn: 14644
2004-07-06 16:03:21 +00:00
Chris Lattner
5b96ed7d1b
Revert patches 1.79 and 1.80 which had to do with dead MBB's. Now that they
...
don't exist, we don't have to pretend to handle them.
llvm-svn: 14567
2004-07-02 05:52:23 +00:00
Chris Lattner
93bf3a5985
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
...
use them instead of a local LiveVariables numbering
llvm-svn: 14523
2004-07-01 06:15:32 +00:00
Chris Lattner
ae4f21e30a
Start using MBB numbers directly instead of going through the live variables
...
map.
llvm-svn: 14518
2004-07-01 04:29:47 +00:00
Chris Lattner
41c3157c70
In line with the previous patch, do not assert out if analyzing a dead basic block.
...
llvm-svn: 14475
2004-06-29 07:16:23 +00:00
Chris Lattner
27c176234c
Do not dereference end iterators. It hurts when you do that.
...
llvm-svn: 14474
2004-06-29 06:56:51 +00:00
Tanya Lattner
da38dc5180
Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
...
llvm-svn: 14389
2004-06-25 00:13:11 +00:00
Chris Lattner
6be1c456a8
Rename Interval class to LiveInterval to avoid conflicting with the already
...
existing llvm::Interval class.
Patch contributed by Vladimir Prus!
http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html
llvm-svn: 14281
2004-06-21 13:10:56 +00:00
Chris Lattner
0046ea7105
Adjust to new TargetMachine interface
...
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
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
Alkis Evlogimenos
d50a5109ff
Remove defs vector from live intervals.
...
llvm-svn: 13892
2004-05-29 16:18:57 +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
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
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
64e76a0d43
Add the long awaited memory operand folding support for linear scan
...
llvm-svn: 12058
2004-03-01 20:05:10 +00:00
Alkis Evlogimenos
b15631fcfa
Uncomment assertions that register# != 0 on calls to
...
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
llvm-svn: 11882
2004-02-26 22:00:20 +00:00
Alkis Evlogimenos
ee3ef42726
Move LiveIntervals.h up to be the first included header
...
llvm-svn: 11721
2004-02-23 01:01:21 +00:00
Alkis Evlogimenos
850bd0819f
Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
...
llvm-svn: 11719
2004-02-23 00:50:15 +00:00
Alkis Evlogimenos
ba33a0ab9b
Print basic block boundaries in machine instruction debug output.
...
llvm-svn: 11704
2004-02-22 05:46:04 +00:00
Alkis Evlogimenos
32d12d31ae
Abstract merging of ranges away from number of slots per instruction.
...
Also make it less aggressive as the current implementation breaks in
some cases.
llvm-svn: 11696
2004-02-22 04:05:13 +00:00
Alkis Evlogimenos
e39c21cc93
Make 'fold' statistic's description the same in both allocators.
...
llvm-svn: 11687
2004-02-21 18:07:33 +00:00
Alkis Evlogimenos
43431e117e
Some more statistics improvements.
...
llvm-svn: 11676
2004-02-20 20:53:26 +00:00
Alkis Evlogimenos
6d57ed784f
Disambiguate statistic descriptions.
...
llvm-svn: 11675
2004-02-20 20:46:49 +00:00
Alkis Evlogimenos
70f547d06e
Rename statistic and add another one.
...
llvm-svn: 11674
2004-02-20 20:43:08 +00:00
Alkis Evlogimenos
f32239a5c6
Too many changes in one commit:
...
1. LiveIntervals now implement a 4 slot per instruction model. Load,
Use, Def and a Store slot. This is required in order to correctly
represent caller saved register clobbering on function calls,
register reuse in the same instruction (def resues last use) and
also spill code added later by the allocator. The previous
representation (2 slots per instruction) was insufficient and as a
result was causing subtle bugs.
2. Fixes in spill code generation. This was the major cause of
failures in the test suite.
3. Linear scan now has core support for folding memory operands. This
is untested and not enabled (the live interval update function does
not attempt to fold loads/stores in instructions).
4. Lots of improvements in the debugging output of both live intervals
and linear scan. Give it a try... it is beautiful :-)
In summary the above fixes all the issues with the recent reserved
register elimination changes and get the allocator very close to the
next big step: folding memory operands.
llvm-svn: 11654
2004-02-20 06:15:40 +00:00
Alkis Evlogimenos
c394f7803b
Be more agressive when joining ranges.
...
llvm-svn: 11575
2004-02-18 04:38:37 +00:00
Alkis Evlogimenos
5c90efed55
Fix overly conservative spill interval computation.
...
llvm-svn: 11574
2004-02-18 03:35:38 +00:00
Alkis Evlogimenos
c6ea9a6b65
Fix spilled interval update. It was too conservative.
...
llvm-svn: 11516
2004-02-17 04:04:20 +00:00
Alkis Evlogimenos
1026a01d5a
Eliminate the use of spill (reserved) registers.
...
llvm-svn: 11476
2004-02-15 10:24:21 +00:00
Alkis Evlogimenos
3eeb600093
Use std::numeric_limits<float>::infinity() instead of
...
std::numeric_limits<float>::max() for weighting preallocated
intervals.
llvm-svn: 11427
2004-02-14 00:44:07 +00:00
Alkis Evlogimenos
6d6ab846af
Remove getAllocatedRegNum(). Use getReg() instead.
...
llvm-svn: 11393
2004-02-13 21:01:20 +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
Chris Lattner
37e040ee03
Do not use MachineOperand::isVirtualRegister either!
...
llvm-svn: 11283
2004-02-10 21:12:22 +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
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
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
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