Vikram S. Adve
1e45411a31
Annotation class for MachineInstr.
...
llvm-svn: 2643
2002-05-19 15:30:21 +00:00
Vikram S. Adve
2780d2dacb
Numerous bug fixes:
...
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect coloring for CC registers (both int and FP): interferences
were being completely ignored for int CC and were considered but no
spills were marked for fp CC!
Also some code improvements:
-- better interface to generating machine instr for common cases
(many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
one codegen phase to another (now used to pass information about
CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint
llvm-svn: 2642
2002-05-19 15:29:31 +00:00
Chris Lattner
181cc32365
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
70411b074c
Add neccesary #include
...
llvm-svn: 2406
2002-04-29 18:48:55 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
37104aace8
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
50cf8f1871
Include appropriate file
...
llvm-svn: 2379
2002-04-28 20:40:16 +00:00
Chris Lattner
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
78dd56fe62
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
002958cdbb
Remove all contents of the cfg namespace to the global namespace
...
llvm-svn: 2369
2002-04-28 16:19:42 +00:00
Chris Lattner
f998685cd9
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
c8e665431b
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Vikram S. Adve
40221aa74c
Don't record instructions for copying method arguments in the
...
AddedInstrns sets for the first machine instruction. It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken. Instead, use a separate set for the function entry.
llvm-svn: 2318
2002-04-25 04:46:28 +00:00
Vikram S. Adve
7a4b381f80
Don't record instructions for copying method arguments in the
...
AddedInstrns sets for the first machine instruction. It is hard
to ensure that the right order is preserved, and sure enough, the
order was broken. Instead, use a separate set for the function entry.
llvm-svn: 2312
2002-04-25 04:34:15 +00:00
Vikram S. Adve
d79d2c3892
Improve printing during dumps.
...
llvm-svn: 2311
2002-04-25 04:31:18 +00:00
Vikram S. Adve
7092772475
Optional args are no longer allocated as they are discovered.
...
(This can be improved to avoid making the initial pass over the method.)
Also, ensure automatic vars and reg. spills areas are not extended
if their sizes are used for computing some other offset.
llvm-svn: 2310
2002-04-25 04:30:43 +00:00
Chris Lattner
75323bc2d2
Only emit message if DEBUG_RA is on
...
llvm-svn: 2252
2002-04-15 20:36:15 +00:00
Chris Lattner
2e9fa6d101
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
99ac15d154
No need to reserve space, erasing does not change the size of the container.
...
llvm-svn: 2201
2002-04-09 18:01:21 +00:00
Chris Lattner
e8a1a44dd4
* Add a file header with some information
...
* Delete the DelaySlotInfo objects created by the SchedulingManager class.
These leaked objects were accounting for 3/4 of the memory leaked by the
backend, so this is a relatively major win.
* Reorganize SchedulingManager::getDelaySlotInfoForInstr so that it has
better code locality (making it easier to read).
llvm-svn: 2197
2002-04-09 05:45:58 +00:00
Chris Lattner
6c1a58d6ba
Clean up the ownership model a bit so that nodes actually get deleted more
...
frequently. This still leaks edges quite a bit, but it leaks no nodes
(I think).
llvm-svn: 2190
2002-04-09 05:15:33 +00:00
Chris Lattner
30e23dacbc
Convert AddedInstrMapType to contain AddedInstrns by value instead of by
...
pointer so that they do not all get leaked!
llvm-svn: 2188
2002-04-09 05:13:04 +00:00
Chris Lattner
3abd752f90
GCC3.0 is reported to die without an alloca definition.
...
llvm-svn: 2186
2002-04-09 03:37:11 +00:00
Chris Lattner
8690ac124f
Don't leak memory like a seive
...
llvm-svn: 2185
2002-04-08 23:09:07 +00:00
Chris Lattner
aca4d447c9
Value cannot be directly instantiated. I think that this code was TRYING to
...
make a PHI node, although it was badly broken. This keeps tests passing, so
we'll go with it.
llvm-svn: 2184
2002-04-08 22:05:54 +00:00
Chris Lattner
f739fa8541
s/Method/Function
...
llvm-svn: 2180
2002-04-08 22:03:57 +00:00
Chris Lattner
95f65b6f84
s/method/function
...
llvm-svn: 2177
2002-04-08 22:01:15 +00:00
Chris Lattner
62b7fd136e
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Vikram S. Adve
c533f04176
Add method clearCallInterference().
...
llvm-svn: 2071
2002-03-31 18:58:14 +00:00
Vikram S. Adve
f434a9ed5f
Include temp. values when computing max. size of stack frame!
...
llvm-svn: 2070
2002-03-31 18:57:49 +00:00
Vikram S. Adve
5bf8890305
Fix a bug in previous bug fix.
...
llvm-svn: 2069
2002-03-31 18:56:51 +00:00
Vikram S. Adve
aa2373d2ed
Bug fix: address used by indirect call instruction should also
...
be marked as having a Call Interference, even though it may not
be live after the call.
llvm-svn: 2068
2002-03-31 18:54:37 +00:00
Chris Lattner
57698e2c0b
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Vikram S. Adve
7a78ae9dd6
Destroy MethodLiveVarInfo after register allocation.
...
llvm-svn: 1976
2002-03-24 03:54:03 +00:00
Vikram S. Adve
479126b3d3
Use deterministic iterator for SchedGraphs. This is actually not
...
useful right now when we only do local scheduling.
llvm-svn: 1975
2002-03-24 03:53:03 +00:00
Vikram S. Adve
9db158f568
Bug fix: nextToTry was not being initialized in one case.
...
llvm-svn: 1974
2002-03-24 03:46:15 +00:00
Vikram S. Adve
e2a0dfad64
Add option to disable scheduling.
...
llvm-svn: 1973
2002-03-24 03:45:35 +00:00
Vikram S. Adve
c228f7a077
Add option to disable scheduling.
...
Destroy live-variable information after scheduling so it is
recomputed before later phases (e.g., reg. allocation).
Use deterministic iterator to enumerate sched graphs.
llvm-svn: 1972
2002-03-24 03:44:55 +00:00
Vikram S. Adve
90039d0ab9
Minor changes.
...
llvm-svn: 1971
2002-03-24 03:40:59 +00:00
Vikram S. Adve
31a5d3a475
Re-fix bug: Put back MachineCodeForInstruction::dropAllReferences.
...
llvm-svn: 1970
2002-03-24 03:40:11 +00:00
Vikram S. Adve
377646fcfd
Fix padding for variables allocated on stack.
...
llvm-svn: 1969
2002-03-24 03:39:26 +00:00
Vikram S. Adve
dc96167e00
Major overhaul to FoldGetElemPtr to handle mixed array and struct refs.
...
llvm-svn: 1968
2002-03-24 03:37:53 +00:00
Vikram S. Adve
8bc420ec6a
Use deterministic iterator for treeRoots.
...
llvm-svn: 1967
2002-03-24 03:36:52 +00:00
Vikram S. Adve
3228f9cc42
Change treeRoots data structure to make enumeration deterministic.
...
llvm-svn: 1962
2002-03-24 03:24:00 +00:00
Chris Lattner
4e8c4877aa
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
8e01c0b70e
Big bug fix: getUsableUniRegAtMI needed to return values in arguments
...
but did not pass the arguments by reference!
llvm-svn: 1906
2002-03-18 03:37:19 +00:00
Vikram S. Adve
7446b323a7
Added function computeOffsetforLocalVar to check how big the
...
offset-from-FP will be before allocating space for a local variable.
llvm-svn: 1905
2002-03-18 03:36:30 +00:00
Vikram S. Adve
307916c008
Bug fix in setting CC register.
...
Also use distinct names for the three types of SetMachineOperand
to avoid painful overloading problems and errors.
llvm-svn: 1904
2002-03-18 03:35:24 +00:00
Vikram S. Adve
e5842b527d
Constants are now added to the constant pool only when a load
...
instruction is actually generated for them.
Rename the different versions of SetMachineOperand.
llvm-svn: 1903
2002-03-18 03:33:43 +00:00
Vikram S. Adve
d2c71c1d08
Use vector for machine instructions returned by GetInstructionsByRule.
...
Fix constants in instructions generated for Phi elimination.
llvm-svn: 1902
2002-03-18 03:31:54 +00:00
Vikram S. Adve
cecde7122c
Big bug fix: getUsableUniRegAtMI needed to return values in arguments
...
but did not pass the arguments by reference!
Also added a function to get a register class by ID.
llvm-svn: 1901
2002-03-18 03:26:48 +00:00
Anand Shukla
ef5631efba
Change to make it build with GCC 2.95.3
...
llvm-svn: 1802
2002-02-26 18:57:15 +00:00
Chris Lattner
7c7930f59c
* Make it compile with GCC 3.0.4
...
llvm-svn: 1788
2002-02-24 23:01:56 +00:00
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