[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp RegAllocLocal.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 15 15:23:21 PDT 2004
Changes in directory llvm/lib/CodeGen:
LiveIntervalAnalysis.cpp updated: 1.116 -> 1.117
RegAllocLocal.cpp updated: 1.67 -> 1.68
---
Log message:
Reduce usage of MRegisterInfo::getRegClass
---
Diffs of the changes: (+3 -3)
Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.116 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.117
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.116 Wed Aug 4 04:46:56 2004
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Aug 15 17:23:09 2004
@@ -661,7 +661,7 @@
if (MRegisterInfo::isVirtualRegister(RegB))
return RegClass != mf_->getSSARegMap()->getRegClass(RegB);
else
- return RegClass != mri_->getRegClass(RegB);
+ return RegClass->contains(RegB);
}
bool LiveIntervals::overlapsAliases(const LiveInterval *LHS,
Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.67 llvm/lib/CodeGen/RegAllocLocal.cpp:1.68
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.67 Sun Aug 15 17:03:57 2004
+++ llvm/lib/CodeGen/RegAllocLocal.cpp Sun Aug 15 17:23:09 2004
@@ -391,7 +391,7 @@
"PhysReg in PhysRegsUseOrder, but is not allocated?");
if (PhysRegsUsed[R]) {
// If the current register is compatible, use it.
- if (RegInfo->getRegClass(R) == RC) {
+ if (RC->contains(R)) {
PhysReg = R;
break;
} else {
@@ -399,7 +399,7 @@
// compatible, use it.
for (const unsigned *AliasSet = RegInfo->getAliasSet(R);
*AliasSet; ++AliasSet) {
- if (RegInfo->getRegClass(*AliasSet) == RC) {
+ if (RC->contains(*AliasSet)) {
PhysReg = *AliasSet; // Take an aliased register
break;
}
More information about the llvm-commits
mailing list