summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-15 22:23:09 +0000
committerChris Lattner <sabre@nondot.org>2004-08-15 22:23:09 +0000
commit5943c5078cfbc6564fc4c9418bcf5ab49c9ce7e8 (patch)
treee2c911d203cc40a68a2a6f6dd2c5173fd088edcd /llvm/lib/CodeGen
parentf26b1fd35df5623e1e9e14103ed5dbc890c7b588 (diff)
downloadbcm5719-llvm-5943c5078cfbc6564fc4c9418bcf5ab49c9ce7e8.tar.gz
bcm5719-llvm-5943c5078cfbc6564fc4c9418bcf5ab49c9ce7e8.zip
Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 15784
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp2
-rw-r--r--llvm/lib/CodeGen/RegAllocLocal.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 52c6b0d8fd4..649068883b8 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -661,7 +661,7 @@ bool LiveIntervals::differingRegisterClasses(unsigned RegA,
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,
diff --git a/llvm/lib/CodeGen/RegAllocLocal.cpp b/llvm/lib/CodeGen/RegAllocLocal.cpp
index 8c04cd6e5a2..482325fbff7 100644
--- a/llvm/lib/CodeGen/RegAllocLocal.cpp
+++ b/llvm/lib/CodeGen/RegAllocLocal.cpp
@@ -391,7 +391,7 @@ unsigned RA::getReg(MachineBasicBlock &MBB, MachineInstr *I,
"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 @@ unsigned RA::getReg(MachineBasicBlock &MBB, MachineInstr *I,
// 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;
}
OpenPOWER on IntegriCloud