summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-04 17:38:48 +0000
committerChris Lattner <sabre@nondot.org>2002-02-04 17:38:48 +0000
commit669a74ce8a89dad2bdc5b40732758e513545e32e (patch)
treead7261bf74901bc66587bb4f11697a71a40a9e22 /llvm/lib
parent4469935eb53c43a4053b5488831787768e45015b (diff)
downloadbcm5719-llvm-669a74ce8a89dad2bdc5b40732758e513545e32e.tar.gz
bcm5719-llvm-669a74ce8a89dad2bdc5b40732758e513545e32e.zip
Make #include "llvm/Analysis/LoopDepth.h" be an internal artifact of how register allocation is implemented.
llvm-svn: 1693
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h
index 38f8dd774b7..8efa7570267 100644
--- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h
+++ b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h
@@ -32,12 +32,12 @@
#include "llvm/CodeGen/RegClass.h"
#include "llvm/CodeGen/LiveRangeInfo.h"
-#include "llvm/Analysis/LoopDepth.h"
#include <deque>
class MachineCodeForMethod;
class MachineRegInfo;
class MethodLiveVarInfo;
class MachineInstr;
+namespace cfg { class LoopDepthCalculator; }
//----------------------------------------------------------------------------
// Class AddedInstrns:
@@ -66,8 +66,7 @@ typedef std::hash_map<const MachineInstr *, AddedInstrns *> AddedInstrMapType;
//----------------------------------------------------------------------------
-class PhyRegAlloc: public NonCopyable
-{
+class PhyRegAlloc: public NonCopyable {
std::vector<RegClass *> RegClassList; // vector of register classes
const TargetMachine &TM; // target machine
@@ -81,10 +80,20 @@ class PhyRegAlloc: public NonCopyable
AddedInstrMapType AddedInstrMap; // to store instrns added in this phase
- cfg::LoopDepthCalculator LoopDepthCalc; // to calculate loop depths
+ cfg::LoopDepthCalculator *LoopDepthCalc; // to calculate loop depths
ReservedColorListType ResColList; // A set of reserved regs if desired.
// currently not used
+public:
+ PhyRegAlloc(Method *M, const TargetMachine& TM, MethodLiveVarInfo *Lvi,
+ cfg::LoopDepthCalculator *LoopDepthCalc);
+ ~PhyRegAlloc();
+
+ // main method called for allocating registers
+ //
+ void allocateRegisters();
+private:
+
//------- ------------------ private methods---------------------------------
@@ -134,16 +143,6 @@ class PhyRegAlloc: public NonCopyable
int getUniRegNotUsedByThisInst(RegClass *RC, const MachineInstr *MInst);
void addInterf4PseudoInstr(const MachineInstr *MInst);
-
- public:
- PhyRegAlloc(Method *const M, const TargetMachine& TM,
- MethodLiveVarInfo *const Lvi);
- ~PhyRegAlloc();
-
- // main method called for allocating registers
- //
- void allocateRegisters();
-
};
OpenPOWER on IntegriCloud