Chris Lattner
29a5df81e4
* Silence signed/unsigned warnings
...
* Make it compile with GCC 3.0.4
llvm-svn: 1787
2002-02-24 23:01:50 +00:00
Chris Lattner
83d485b310
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
60a6591d83
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
ea13e0afa0
Convert operand iterator over to work like an STL iterator
...
llvm-svn: 1720
2002-02-05 06:02:59 +00:00
Chris Lattner
7e5ee4253c
Minor change: Methods that return ValueSet's that are guaranteed to be valid
...
return references instead of pointers.
llvm-svn: 1719
2002-02-05 04:20:12 +00:00
Chris Lattner
d30f989cda
* Code Cleanups
...
* Removal dependencies on Type.h & remove uses of getTypeID()
llvm-svn: 1718
2002-02-05 03:52:29 +00:00
Chris Lattner
f1223ace96
* Code Cleanups of IGNode.h
...
* Removal of getTypeID() methods, and dependence on llvm/Type.h, from IGNode & LiveRange
llvm-svn: 1717
2002-02-05 03:51:37 +00:00
Chris Lattner
101a5d9197
Must include SetOperations to do set_*
...
llvm-svn: 1716
2002-02-05 03:35:53 +00:00
Chris Lattner
b0af9cdbda
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
* Eliminate some irrelevant const's
llvm-svn: 1712
2002-02-05 02:52:05 +00:00
Chris Lattner
b1def732af
* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
...
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
llvm-svn: 1711
2002-02-05 02:51:01 +00:00
Chris Lattner
30e8fb69c5
* Code Cleanups
...
* Introduce RAV to allow stream I/O instead of using printValue
llvm-svn: 1710
2002-02-05 01:43:49 +00:00
Chris Lattner
3da53ad636
* Add a #include not indirectly included any more
...
llvm-svn: 1707
2002-02-05 00:35:14 +00:00
Chris Lattner
aa7a151874
* RegisterAllocation _uses_ LiveVar analysis, instead of creating it's own copy
...
llvm-svn: 1701
2002-02-04 20:02:38 +00:00
Chris Lattner
6974172717
* The itf exposed by InstrScheduling is now a single function to create the right pass
...
* InstructionScheduling is now a real pass
* InstrSched _uses_ LiveVar analysis, instead of creating it's own copy many times
through a loop. In this was LiveVarAnalysis is actually even SHARED by Register
allocation.
* SchedPriorities is now passed the live var information in
llvm-svn: 1700
2002-02-04 20:02:16 +00:00
Chris Lattner
347a23921a
Switch register allocator over to using LoopInfo directly instead of indirectly through LoopDepthCalculator
...
llvm-svn: 1696
2002-02-04 17:48:00 +00:00
Chris Lattner
8a352d597c
Make LoopDeptCalculator be an internal artifact of how RegAlloc is implemented,
...
do not expose it. Additionally, have it be auto generated by the pass framework
for us.
llvm-svn: 1695
2002-02-04 17:39:42 +00:00
Chris Lattner
669a74ce8a
Make #include "llvm/Analysis/LoopDepth.h" be an internal artifact of how register allocation is implemented.
...
llvm-svn: 1693
2002-02-04 17:38:48 +00:00
Chris Lattner
83a8434eb2
* Add #includes removed from headers
...
* ValueSet interface converted from add/remove to insert/erase
* Minor cleanups
llvm-svn: 1689
2002-02-04 16:36:59 +00:00
Chris Lattner
e630ac9330
Remove dependence on BBLiveVar from InstrScheduling
...
Minor cleanups
llvm-svn: 1688
2002-02-04 16:35:45 +00:00
Chris Lattner
f48173a875
Convert RegisterAllocator interface to opaque pass type, so that users do not
...
need to know _anything_ about RegAlloc to use it. Well in the end maybe.
llvm-svn: 1681
2002-02-04 15:54:09 +00:00
Chris Lattner
49562d8442
Add #includes neccesary since they were removed from .h files
...
llvm-svn: 1675
2002-02-04 05:56:09 +00:00
Chris Lattner
a8171dd554
Move instrIsFeasible from InstrScheduling.h
...
llvm-svn: 1674
2002-02-04 05:55:42 +00:00
Chris Lattner
b0da8b2de1
* Minor cleanups
...
* Reduce number of #includes, sometimes drastically (LiveRangeInfo.h lost _7_)
* Move instrIsFeasible() from InstrScheduling.h to SchedPriorities.h
* Delete blank lines at end of files
llvm-svn: 1672
2002-02-04 05:52:08 +00:00
Chris Lattner
720bc02f18
* Move command line parsing debug stuff to InstrScheduling internal header file
...
SchedPriorities.h
llvm-svn: 1669
2002-02-04 02:44:20 +00:00
Chris Lattner
36aa542ef0
Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
...
that has a very minimal interface (like it should have).
llvm-svn: 1667
2002-02-04 00:33:08 +00:00
Chris Lattner
eda6bd71a0
Code pulled out of MAchineInstr.(h|cpp)
...
llvm-svn: 1660
2002-02-03 07:54:50 +00:00
Chris Lattner
abafc3bc70
Lots of code cleanups, no functional changes
...
llvm-svn: 1650
2002-02-03 07:46:34 +00:00
Chris Lattner
4cec147d4e
* Prune #includes
...
* Remove MachineCodeFor(Method|VMInstr) code to their own .cpp files
llvm-svn: 1649
2002-02-03 07:46:01 +00:00
Chris Lattner
b86d191dbe
* Switch over to cleaner TmpInstruction model
...
llvm-svn: 1648
2002-02-03 07:39:06 +00:00
Chris Lattner
e59929f7b2
* Straighten out #includes
...
* Switch to MAchineCodeForInstruction model instead of MachineCodeForVMInstr
llvm-svn: 1647
2002-02-03 07:33:46 +00:00
Chris Lattner
0068ea26d7
* Swich to annotation model for MachineCodeForInstruction
...
llvm-svn: 1646
2002-02-03 07:31:41 +00:00
Chris Lattner
02d8e37cae
Remove extraneous #includes
...
llvm-svn: 1645
2002-02-03 07:30:08 +00:00
Chris Lattner
a17c469136
* Straighten out #includes
...
* Switch from MachineCodeForVMInstr to MachineCodeForInstruction model
llvm-svn: 1644
2002-02-03 07:29:45 +00:00
Chris Lattner
7c9c85947c
* Get machine instrs from Instructin's by using MachineCodeForInstruction::get
...
* Convert a few (*X). to X->
llvm-svn: 1643
2002-02-03 07:28:30 +00:00
Chris Lattner
6316f38c96
Add a class forward decl
...
llvm-svn: 1637
2002-02-03 07:13:04 +00:00
Chris Lattner
9fcaf328f6
LoopDepth calculation is now in CFG namespace
...
llvm-svn: 1601
2002-01-31 00:41:13 +00:00
Chris Lattner
447fd86599
Make it build with 2.95.3
...
llvm-svn: 1554
2002-01-23 05:47:57 +00:00
Chris Lattner
73da1cea60
Oops lost a parenthesis somehow :(
...
llvm-svn: 1504
2002-01-21 01:33:12 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
bc28455806
Fixed a bug in spill cost estimation
...
llvm-svn: 1500
2002-01-08 16:29:23 +00:00
Ruchira Sasanka
a42a7e78b6
PhyRegAlloc.cpp: Added temp area resetting before every call
...
llvm-svn: 1499
2002-01-07 21:09:06 +00:00
Ruchira Sasanka
8c2d8256a9
Added destructors and comments.
...
Added correct spill candidate selection logic.
llvm-svn: 1493
2002-01-07 19:19:18 +00:00
Ruchira Sasanka
f20079dfed
Added comments, destructors where necessary.
...
llvm-svn: 1491
2002-01-07 19:16:26 +00:00
Vikram S. Adve
cb2335f13f
Eliminate all uses of memInst->getIndicesBROKEN().
...
llvm-svn: 1485
2001-12-15 00:36:32 +00:00
Chris Lattner
2413b160ec
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
3462ae3ad7
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
5de2204fe8
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
0c8eea1b6f
Stuff after a #endif is not valid CPP input and breaks some compilers
...
llvm-svn: 1375
2001-11-26 18:56:52 +00:00
Chris Lattner
63b52693c8
The old getIndices has been deprecated, because it no longer works. It now
...
is named getIndicesBROKEN() and shall be removed when the codebase is updated
to not call it
llvm-svn: 1338
2001-11-26 16:56:19 +00:00
Ruchira Sasanka
7dfa1650a2
Commented some popTempArg.. since it leads to a bug
...
llvm-svn: 1326
2001-11-15 22:02:06 +00:00
Ruchira Sasanka
ec62f24009
Added naming to inserted phi copy values - for easy debugging
...
llvm-svn: 1325
2001-11-15 20:46:40 +00:00
Ruchira Sasanka
9066899a78
Fixed a bug in setReLRegsUsedByMI
...
llvm-svn: 1323
2001-11-15 20:23:19 +00:00
Ruchira Sasanka
dec9bfd554
Changed some names of methods, added const etc.
...
llvm-svn: 1322
2001-11-15 20:22:37 +00:00
Vikram S. Adve
fbb8a64749
Modify AllocateLocalVar method to take a size argument.
...
llvm-svn: 1318
2001-11-15 15:22:26 +00:00
Ruchira Sasanka
a514745a96
fixed setUsedRegAtMI
...
llvm-svn: 1317
2001-11-15 15:00:53 +00:00
Ruchira Sasanka
c5989f645b
Changed phi elimination code
...
llvm-svn: 1311
2001-11-15 00:27:14 +00:00
Ruchira Sasanka
64f7567391
Small changed to printing a machine operand - It the operand is a def, it prints
...
a star after it - only for debugging
llvm-svn: 1309
2001-11-14 20:05:23 +00:00
Vikram S. Adve
cba86d060b
Don't assume constant operand can only be in position 1!
...
llvm-svn: 1308
2001-11-14 18:49:45 +00:00
Vikram S. Adve
65d54eb06e
Idiotic error in last fix.
...
llvm-svn: 1306
2001-11-14 17:55:02 +00:00
Vikram S. Adve
c1b534043f
Don't need to load a NULL pointer constant from memory!
...
llvm-svn: 1305
2001-11-14 17:24:49 +00:00
Ruchira Sasanka
7765ca8b25
Added support method for setting interference for pseudo instructions
...
llvm-svn: 1303
2001-11-14 15:37:13 +00:00
Ruchira Sasanka
f1acecccb6
Added interference for args in pseudo instructions
...
llvm-svn: 1300
2001-11-14 15:33:58 +00:00
Chris Lattner
1237e86597
Remove much cruft from the MemAccessInst instruction
...
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Ruchira Sasanka
33c400f6a7
commented out lines printing code after scheduling
...
llvm-svn: 1295
2001-11-13 23:12:53 +00:00
Ruchira Sasanka
36f13d1c2f
Fixed a bug concering LR spilling. Earlier, added spilled code was not inserted
...
into the instruction stream correctly.
llvm-svn: 1294
2001-11-13 23:09:30 +00:00
Vikram S. Adve
dafc8b909e
Do the same for allocating spills to get their alignment right too.
...
llvm-svn: 1285
2001-11-12 23:40:22 +00:00
Vikram S. Adve
6e9422e14c
When allocating space on stack for writing a register,
...
use the size of the register, not the size of the Value type,
to get the right alignment.
llvm-svn: 1284
2001-11-12 23:26:35 +00:00
Vikram S. Adve
4b9c46da24
Bug fix in offset alignment computations: don't subtract the padding
...
value from size *before* subtracting size from offset!
llvm-svn: 1283
2001-11-12 23:26:23 +00:00
Ruchira Sasanka
c189997516
For phi elimination, now we are generating only one instruction
...
using cpValue2Value instead of
passing vector to createCopyInstructionByType.
llvm-svn: 1272
2001-11-12 19:42:27 +00:00
Vikram S. Adve
03fae5e5db
Eliminate most uses of the machine instruction vector for each LLVM instr,
...
since some m. instr. may be generated by LLVM instrs. in other blocks.
Handle non-SSA (anti and output) edges and true edges uniformly by
working with machine instructions alone.
llvm-svn: 1269
2001-11-12 18:53:43 +00:00
Ruchira Sasanka
9f246e65d3
Added phi elimination code - not final
...
llvm-svn: 1264
2001-11-12 14:44:50 +00:00
Vikram S. Adve
6e004c0818
Improved printing routines.
...
llvm-svn: 1263
2001-11-12 14:19:47 +00:00
Vikram S. Adve
dff0a891c1
Major improvement to how nodes are built for a BB.
...
LLVM instruction is no longer recorded in each node, but BB is.
llvm-svn: 1262
2001-11-12 14:18:01 +00:00
Vikram S. Adve
3b02a35a80
Adjust all stack variable offsets to be aligned by size.
...
llvm-svn: 1261
2001-11-12 05:17:23 +00:00
Vikram S. Adve
1d5c6e0939
Fix errors in computing downgrowing offsets, and in
...
computing size of extra outgoing args.
llvm-svn: 1256
2001-11-11 21:23:33 +00:00
Vikram S. Adve
6cd83556e6
Only add true dep. edges from an earlier to a later instruction.
...
This wasn't a problem until we started putting copies for Phi values
that produced cycles in the SchedGraph!
llvm-svn: 1254
2001-11-11 01:23:27 +00:00
Ruchira Sasanka
d1d5e97431
Changed code to ignore Phi Nodes in PhyRegAlloc
...
llvm-svn: 1253
2001-11-10 21:21:36 +00:00
Ruchira Sasanka
31305c0d57
Coalesing bug fix - now checks for the same regType instead of the same
...
regClass since FP class has two reg Types.
llvm-svn: 1236
2001-11-10 00:20:24 +00:00
Ruchira Sasanka
d499a26116
No major change
...
llvm-svn: 1235
2001-11-09 23:49:42 +00:00
Vikram S. Adve
313a36f2d3
Use node->getOpCode() instead of node->getMachineInstr()->getOpCode().
...
Much nicer.
llvm-svn: 1223
2001-11-09 02:14:20 +00:00
Chris Lattner
2b48b9694c
Add method decl
...
llvm-svn: 1217
2001-11-08 20:55:05 +00:00
Ruchira Sasanka
dc709780aa
corrected insertCode4Spilled ... bug.
...
llvm-svn: 1212
2001-11-08 19:11:30 +00:00
Ruchira Sasanka
19a5165c29
Uncommented LR spill code insertion
...
llvm-svn: 1207
2001-11-08 16:43:25 +00:00
Vikram S. Adve
621b90440b
Major change to how defs are found when adding dependences (they
...
are now found as part of the initial walk of the machine code).
Also memory load/store instructions can be generated for non-memory
LLVM instructions, which wasn't handled before. It is now.
llvm-svn: 1199
2001-11-08 05:20:23 +00:00
Vikram S. Adve
80310bba37
MachineCodeForMethod is now an annotation on class Method.
...
llvm-svn: 1198
2001-11-08 05:18:18 +00:00
Vikram S. Adve
bdbb802c2f
Added two minor methods.
...
llvm-svn: 1187
2001-11-08 04:49:52 +00:00
Vikram S. Adve
d9f8598104
Removed class RegStackOffsets and used class MachineCodeForMethod
...
directly to manage stack frame.
llvm-svn: 1186
2001-11-08 04:48:50 +00:00
Vikram S. Adve
c53037205b
Major overhaul of stack frame management.
...
llvm-svn: 1185
2001-11-08 04:47:06 +00:00
Ruchira Sasanka
074d52d60d
Fixed bug - added code in pushUnconstrainedIGNodes() to check whether a node
...
is already pushed to stack by a previous call to the same method.
llvm-svn: 1154
2001-11-06 15:25:38 +00:00
Vikram S. Adve
928833ecea
Bug fix: uninitialized variable.
...
llvm-svn: 1147
2001-11-06 05:11:05 +00:00
Vikram S. Adve
596721384b
Modified graph construction to use one pass to find all defs.
...
Avoids having to handle some special cases that cause complex interactions
with instr. selection.
llvm-svn: 1138
2001-11-05 04:04:23 +00:00
Vikram S. Adve
59a13288a6
Make reg. numbers signed ints.
...
llvm-svn: 1137
2001-11-05 03:56:02 +00:00
Chris Lattner
33d9cb9903
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Ruchira Sasanka
471babe2d2
Added an assertion since it seems like AdjList returns an errornous size in method
...
IGNode::pushOnStack().
llvm-svn: 1116
2001-11-03 22:01:09 +00:00
Ruchira Sasanka
51fc1c2d72
Added support for correct spilling of %ccr
...
llvm-svn: 1112
2001-11-03 20:41:22 +00:00
Ruchira Sasanka
ca632ed71a
Arranged stack frame - needs furhter organization
...
llvm-svn: 1108
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
b7a397253f
Arranged stack frame - needs furhter organization
...
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp
llvm-svn: 1106
2001-11-03 17:13:27 +00:00
Vikram S. Adve
33ec4a3c23
Record constants that need to be emitted in the assembly code.
...
llvm-svn: 1010
2001-10-28 21:46:23 +00:00
Vikram S. Adve
979800ede8
Allow combinations of True/Anti/Output flags for each edge to
...
support, e.g., dependences on Call instructions.
llvm-svn: 1009
2001-10-28 21:45:02 +00:00