summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCSE.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-02-16 02:32:10 +0000
committerLang Hames <lhames@gmail.com>2012-02-16 02:32:10 +0000
commit55a2a96153bc39e2a1768a32c21139b49165d52f (patch)
tree22cb2dbd4caef3ce0340f9814bcb2d9e9d5d0f4b /llvm/lib/CodeGen/MachineCSE.cpp
parent11ca986b17e0f5a5e76b15fcc100d069e1ddfe67 (diff)
downloadbcm5719-llvm-55a2a96153bc39e2a1768a32c21139b49165d52f.tar.gz
bcm5719-llvm-55a2a96153bc39e2a1768a32c21139b49165d52f.zip
Oop - r150653 + r150654 broke one of my test cases. Backing out for now...
llvm-svn: 150655
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCSE.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp
index 491a22caf0c..3031d4588b2 100644
--- a/llvm/lib/CodeGen/MachineCSE.cpp
+++ b/llvm/lib/CodeGen/MachineCSE.cpp
@@ -63,8 +63,6 @@ namespace {
virtual void releaseMemory() {
ScopeMap.clear();
Exps.clear();
- AllocatableRegs.clear();
- ReservedRegs.clear();
}
private:
@@ -78,8 +76,6 @@ namespace {
ScopedHTType VNT;
SmallVector<MachineInstr*, 64> Exps;
unsigned CurrVN;
- BitVector AllocatableRegs;
- BitVector ReservedRegs;
bool PerformTrivialCoalescing(MachineInstr *MI, MachineBasicBlock *MBB);
bool isPhysDefTriviallyDead(unsigned Reg,
@@ -240,9 +236,9 @@ bool MachineCSE::PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
return false;
for (unsigned i = 0, e = PhysDefs.size(); i != e; ++i) {
- if (AllocatableRegs.test(PhysDefs[i]) || ReservedRegs.test(PhysDefs[i]))
- // Avoid extending live range of physical registers if they are
- //allocatable or reserved.
+ if (TRI->isInAllocatableClass(PhysDefs[i]))
+ // Avoid extending live range of physical registers unless
+ // they are unallocatable.
return false;
}
CrossMBB = true;
@@ -592,7 +588,5 @@ bool MachineCSE::runOnMachineFunction(MachineFunction &MF) {
MRI = &MF.getRegInfo();
AA = &getAnalysis<AliasAnalysis>();
DT = &getAnalysis<MachineDominatorTree>();
- AllocatableRegs = TRI->getAllocatableSet(MF);
- ReservedRegs = TRI->getReservedRegs(MF);
return PerformCSE(DT->getRootNode());
}
OpenPOWER on IntegriCloud