summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocBasic.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-01 23:28:30 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-06-01 23:28:30 +0000
commit54038d796c806abb9570a9f9be689ae2380968cf (patch)
tree0f0cbc742deff8de9ecd281dfdf8fabe3a96b026 /llvm/lib/CodeGen/RegAllocBasic.cpp
parent4ce37abb525e432e41c94fc3f0cf36aabf88b942 (diff)
downloadbcm5719-llvm-54038d796c806abb9570a9f9be689ae2380968cf.tar.gz
bcm5719-llvm-54038d796c806abb9570a9f9be689ae2380968cf.zip
Switch all register list clients to the new MC*Iterator interface.
No functional change intended. Sorry for the churn. The iterator classes are supposed to help avoid giant commits like this one in the future. The TableGen-produced register lists are getting quite large, and it may be necessary to change the table representation. This makes it possible to do so without changing all clients (again). llvm-svn: 157854
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocBasic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp
index 6b01ccb3094..83dbbf2c1db 100644
--- a/llvm/lib/CodeGen/RegAllocBasic.cpp
+++ b/llvm/lib/CodeGen/RegAllocBasic.cpp
@@ -204,8 +204,8 @@ bool RABasic::spillInterferences(LiveInterval &VirtReg, unsigned PhysReg,
// either the union or live intervals.
unsigned NumInterferences = 0;
// Collect interferences assigned to any alias of the physical register.
- for (const uint16_t *asI = TRI->getOverlaps(PhysReg); *asI; ++asI) {
- LiveIntervalUnion::Query &QAlias = query(VirtReg, *asI);
+ for (MCRegAliasIterator AI(PhysReg, TRI, true); AI.isValid(); ++AI) {
+ LiveIntervalUnion::Query &QAlias = query(VirtReg, *AI);
NumInterferences += QAlias.collectInterferingVRegs();
if (QAlias.seenUnspillableVReg()) {
return false;
@@ -216,8 +216,8 @@ bool RABasic::spillInterferences(LiveInterval &VirtReg, unsigned PhysReg,
assert(NumInterferences > 0 && "expect interference");
// Spill each interfering vreg allocated to PhysReg or an alias.
- for (const uint16_t *AliasI = TRI->getOverlaps(PhysReg); *AliasI; ++AliasI)
- spillReg(VirtReg, *AliasI, SplitVRegs);
+ for (MCRegAliasIterator AI(PhysReg, TRI, true); AI.isValid(); ++AI)
+ spillReg(VirtReg, *AI, SplitVRegs);
return true;
}
OpenPOWER on IntegriCloud