[llvm] r175674 - Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
Cameron Zwarich
zwarich at apple.com
Wed Feb 20 14:10:02 PST 2013
Author: zwarich
Date: Wed Feb 20 16:10:02 2013
New Revision: 175674
URL: http://llvm.org/viewvc/llvm-project?rev=175674&view=rev
Log:
Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
and SlotIndexes.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=175674&r1=175673&r2=175674&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Feb 20 16:10:02 2013
@@ -67,7 +67,6 @@ class TwoAddressInstructionPass : public
const InstrItineraryData *InstrItins;
MachineRegisterInfo *MRI;
LiveVariables *LV;
- SlotIndexes *Indexes;
LiveIntervals *LIS;
AliasAnalysis *AA;
CodeGenOpt::Level OptLevel;
@@ -533,8 +532,8 @@ commuteInstruction(MachineBasicBlock::it
if (LV)
// Update live variables
LV->replaceKillInstruction(RegC, MI, NewMI);
- if (Indexes)
- Indexes->replaceMachineInstrInMaps(MI, NewMI);
+ if (LIS)
+ LIS->ReplaceMachineInstrInMaps(MI, NewMI);
MBB->insert(mi, NewMI); // Insert the new inst
MBB->erase(mi); // Nuke the old inst.
@@ -587,8 +586,8 @@ TwoAddressInstructionPass::convertInstTo
DEBUG(dbgs() << "2addr: TO 3-ADDR: " << *NewMI);
bool Sunk = false;
- if (Indexes)
- Indexes->replaceMachineInstrInMaps(mi, NewMI);
+ if (LIS)
+ LIS->ReplaceMachineInstrInMaps(mi, NewMI);
if (NewMI->findRegisterUseOperand(RegB, false, TRI))
// FIXME: Temporary workaround. If the new instruction doesn't
@@ -1378,7 +1377,6 @@ bool TwoAddressInstructionPass::runOnMac
TII = TM.getInstrInfo();
TRI = TM.getRegisterInfo();
InstrItins = TM.getInstrItineraryData();
- Indexes = getAnalysisIfAvailable<SlotIndexes>();
LV = getAnalysisIfAvailable<LiveVariables>();
LIS = getAnalysisIfAvailable<LiveIntervals>();
AA = &getAnalysis<AliasAnalysis>();
More information about the llvm-commits
mailing list