aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-09-28 17:05:43 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-09-28 17:05:43 +0000
commit1c397aae8ed24d4c589a846a52058274dea615ed (patch)
treee00d218a4a37388ee0510316bc793a26503012c3
parent9d67cd1468fa99bf98c52d85a9462f18e63133f3 (diff)
Added a couple of helper methods for live range construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3970 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAlloc/LiveRangeInfo.h25
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h25
2 files changed, 24 insertions, 26 deletions
diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.h b/lib/CodeGen/RegAlloc/LiveRangeInfo.h
index 0ae5b34178..48abdc0da5 100644
--- a/lib/CodeGen/RegAlloc/LiveRangeInfo.h
+++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.h
@@ -58,13 +58,21 @@ class LiveRangeInfo {
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
- void unionAndUpdateLRs(LiveRange *L1, LiveRange *L2);
+ LiveRange* createNewLiveRange (const Value* Def,
+ bool isCC = false);
- void addInterference(const Instruction *Inst, const ValueSet *LVSet);
+ LiveRange* createOrAddToLiveRange (const Value* Def,
+ bool isCC = false);
+
+ void unionAndUpdateLRs (LiveRange *L1,
+ LiveRange *L2);
+
+ void addInterference (const Instruction *Inst,
+ const ValueSet *LVSet);
- void suggestRegs4CallRets();
+ void suggestRegs4CallRets ();
- const Function *getMethod() { return Meth; }
+ const Function *getMethod () const { return Meth; }
public:
@@ -79,15 +87,6 @@ public:
// Main entry point for live range construction
//
void constructLiveRanges();
-
- // This method is used to add a live range created elsewhere (e.g.,
- // in machine specific code) to the common live range map
- //
- inline void addLRToMap(const Value *Val, LiveRange *LR) {
- assert(Val && LR && "Val/LR is NULL!\n");
- assert((!LiveRangeMap[Val]) && "LR already set in map");
- LiveRangeMap[Val] = LR;
- }
// return the common live range map for this method
//
diff --git a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
index 0ae5b34178..48abdc0da5 100644
--- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
+++ b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
@@ -58,13 +58,21 @@ class LiveRangeInfo {
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
- void unionAndUpdateLRs(LiveRange *L1, LiveRange *L2);
+ LiveRange* createNewLiveRange (const Value* Def,
+ bool isCC = false);
- void addInterference(const Instruction *Inst, const ValueSet *LVSet);
+ LiveRange* createOrAddToLiveRange (const Value* Def,
+ bool isCC = false);
+
+ void unionAndUpdateLRs (LiveRange *L1,
+ LiveRange *L2);
+
+ void addInterference (const Instruction *Inst,
+ const ValueSet *LVSet);
- void suggestRegs4CallRets();
+ void suggestRegs4CallRets ();
- const Function *getMethod() { return Meth; }
+ const Function *getMethod () const { return Meth; }
public:
@@ -79,15 +87,6 @@ public:
// Main entry point for live range construction
//
void constructLiveRanges();
-
- // This method is used to add a live range created elsewhere (e.g.,
- // in machine specific code) to the common live range map
- //
- inline void addLRToMap(const Value *Val, LiveRange *LR) {
- assert(Val && LR && "Val/LR is NULL!\n");
- assert((!LiveRangeMap[Val]) && "LR already set in map");
- LiveRangeMap[Val] = LR;
- }
// return the common live range map for this method
//