Commit Graph

262 Commits

Author SHA1 Message Date
Chris Lattner
221d688a5e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1746 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-12 21:07:25 +00:00
Chris Lattner
2f898d2074 Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 06:02:59 +00:00
Chris Lattner
748697d242 Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1719 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 04:20:12 +00:00
Chris Lattner
3773094a1d * Code Cleanups
* Removal dependencies on Type.h & remove uses of getTypeID()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1718 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:52:29 +00:00
Chris Lattner
569ea239f0 * Code Cleanups of IGNode.h
* Removal of getTypeID() methods, and dependence on llvm/Type.h, from IGNode & LiveRange


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1717 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:51:37 +00:00
Chris Lattner
7471a7b019 Must include SetOperations to do set_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1716 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 03:35:53 +00:00
Chris Lattner
296b7730e3 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1712 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:52:05 +00:00
Chris Lattner
5e5dfa307a * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 02:51:01 +00:00
Chris Lattner
0665a5f1f5 * Code Cleanups
* Introduce RAV to allow stream I/O instead of using printValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1710 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 01:43:49 +00:00
Chris Lattner
4996084acf * Add a #include not indirectly included any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1707 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-05 00:35:14 +00:00
Chris Lattner
4d7fc119b8 * RegisterAllocation _uses_ LiveVar analysis, instead of creating it's own copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1701 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:02:38 +00:00
Chris Lattner
9adb7ad457 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1700 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 20:02:16 +00:00
Chris Lattner
14ab1ce020 Switch register allocator over to using LoopInfo directly instead of indirectly through LoopDepthCalculator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1696 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:48:00 +00:00
Chris Lattner
4911c357e1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1695 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:39:42 +00:00
Chris Lattner
3e0f8288e7 Make #include "llvm/Analysis/LoopDepth.h" be an internal artifact of how register allocation is implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1693 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 17:38:48 +00:00
Chris Lattner
30adeb6d07 * Add #includes removed from headers
* ValueSet interface converted from add/remove to insert/erase
* Minor cleanups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1689 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:36:59 +00:00
Chris Lattner
f35f2fbbc2 Remove dependence on BBLiveVar from InstrScheduling
Minor cleanups


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1688 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 16:35:45 +00:00
Chris Lattner
2f9b28e59a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1681 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 15:54:09 +00:00
Chris Lattner
0a8ed9401d Add #includes neccesary since they were removed from .h files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1675 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:56:09 +00:00
Chris Lattner
b99bd2b145 Move instrIsFeasible from InstrScheduling.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1674 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:55:42 +00:00
Chris Lattner
2182c785c2 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1672 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 05:52:08 +00:00
Chris Lattner
77f66c131d * Move command line parsing debug stuff to InstrScheduling internal header file
SchedPriorities.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1669 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 02:44:20 +00:00
Chris Lattner
6dd98a6c31 Split RegisterAllocation stuff OUT of Sparc.cpp into a well defined pass
that has a very minimal interface (like it should have).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1667 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-04 00:33:08 +00:00
Chris Lattner
f2868ce228 Code pulled out of MAchineInstr.(h|cpp)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1660 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:54:50 +00:00
Chris Lattner
dd1e40b4ce Lots of code cleanups, no functional changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1650 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:46:34 +00:00
Chris Lattner
3801f6d383 * Prune #includes
* Remove MachineCodeFor(Method|VMInstr) code to their own .cpp files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1649 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:46:01 +00:00
Chris Lattner
fb3b1ec982 * Switch over to cleaner TmpInstruction model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1648 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:39:06 +00:00
Chris Lattner
06cb1b7382 * Straighten out #includes
* Switch to MAchineCodeForInstruction model instead of MachineCodeForVMInstr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1647 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:33:46 +00:00
Chris Lattner
a8bbb6bced * Swich to annotation model for MachineCodeForInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1646 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:31:41 +00:00
Chris Lattner
de6dbabaee Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1645 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:30:08 +00:00
Chris Lattner
0861b0c3e6 * Straighten out #includes
* Switch from MachineCodeForVMInstr to MachineCodeForInstruction model


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1644 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:29:45 +00:00
Chris Lattner
3462cae44f * Get machine instrs from Instructin's by using MachineCodeForInstruction::get
* Convert a few (*X). to X->


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1643 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:28:30 +00:00
Chris Lattner
29f4c06b7f Add a class forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1637 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:13:04 +00:00
Chris Lattner
92a12d5c6b LoopDepth calculation is now in CFG namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1601 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:41:13 +00:00
Chris Lattner
a16c3efb9f Make it build with 2.95.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1554 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-23 05:47:57 +00:00
Chris Lattner
dbe5304f77 Oops lost a parenthesis somehow :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1504 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 01:33:12 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
ce773da223 Fixed a bug in spill cost estimation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1500 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-08 16:29:23 +00:00
Ruchira Sasanka
6a3db8c117 PhyRegAlloc.cpp: Added temp area resetting before every call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1499 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 21:09:06 +00:00
Ruchira Sasanka
4f3eb22e1f Added destructors and comments.
Added correct spill candidate selection logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1493 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:19:18 +00:00
Ruchira Sasanka
42bd177eae Added comments, destructors where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1491 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:16:26 +00:00
Vikram S. Adve
fa24897f9f Eliminate all uses of memInst->getIndicesBROKEN().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1485 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-15 00:36:32 +00:00
Chris Lattner
7a17675206 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 00:03:30 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
7061dc50b2 Split the PHINode class out from the iOther.h file into the iPHINode.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1405 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 18:02:31 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00
Chris Lattner
4ed17bad69 Stuff after a #endif is not valid CPP input and breaks some compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1375 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:56:52 +00:00
Chris Lattner
69a86e4e23 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1338 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:56:19 +00:00
Ruchira Sasanka
f90870f622 Commented some popTempArg.. since it leads to a bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1326 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 22:02:06 +00:00
Ruchira Sasanka
07c7086bd2 Added naming to inserted phi copy values - for easy debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1325 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 20:46:40 +00:00