aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/InterferenceCache.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-13 20:14:52 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-13 20:14:52 +0000
commit7bb72e2824f3b462dc1c435c619c4710bce69c2c (patch)
tree523bdef12b2badf38d49ab14f05bd2b66270d651 /llvm/lib/CodeGen/InterferenceCache.h
parent928a25714e6d980e2eea215c24686d483015a8ac (diff)
downloadllvm-7bb72e2824f3b462dc1c435c619c4710bce69c2c.zip
llvm-7bb72e2824f3b462dc1c435c619c4710bce69c2c.tar.gz
llvm-7bb72e2824f3b462dc1c435c619c4710bce69c2c.tar.bz2
Move the InterferenceCache cursor into the GlobalSplitCand struct.
This is in preparation of supporting multiple global split candidates in a single live range split operation. llvm-svn: 135074
Diffstat (limited to 'llvm/lib/CodeGen/InterferenceCache.h')
-rw-r--r--llvm/lib/CodeGen/InterferenceCache.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/InterferenceCache.h b/llvm/lib/CodeGen/InterferenceCache.h
index 6c36fa4..6434b3a7 100644
--- a/llvm/lib/CodeGen/InterferenceCache.h
+++ b/llvm/lib/CodeGen/InterferenceCache.h
@@ -127,10 +127,14 @@ public:
Entry *CacheEntry;
BlockInterference *Current;
public:
- /// Cursor - Create a cursor for the interference allocated to PhysReg and
- /// all its aliases.
- Cursor(InterferenceCache &Cache, unsigned PhysReg)
- : CacheEntry(Cache.get(PhysReg)), Current(0) {}
+ /// Cursor - Create a dangling cursor.
+ Cursor() : CacheEntry(0), Current(0) {}
+
+ /// setPhysReg - Point this cursor to PhysReg's interference.
+ void setPhysReg(InterferenceCache &Cache, unsigned PhysReg) {
+ CacheEntry = Cache.get(PhysReg);
+ Current = 0;
+ }
/// moveTo - Move cursor to basic block MBBNum.
void moveToBlock(unsigned MBBNum) {