aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/InstrSched
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-02-05 06:02:59 +0000
committerChris Lattner <sabre@nondot.org>2002-02-05 06:02:59 +0000
commit2f898d207466bf233b55607e404baca302bc7b5e (patch)
treee7e8036f6881ebf092db953518b5b15ca9949edc /lib/Target/SparcV9/InstrSched
parent748697d2421051b3ff1263d13cccaf410f3e7034 (diff)
downloadexternal_llvm-2f898d207466bf233b55607e404baca302bc7b5e.zip
external_llvm-2f898d207466bf233b55607e404baca302bc7b5e.tar.gz
external_llvm-2f898d207466bf233b55607e404baca302bc7b5e.tar.bz2
Convert operand iterator over to work like an STL iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/InstrSched')
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedPriorities.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
index fed3f94..1d49831 100644
--- a/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
+++ b/lib/Target/SparcV9/InstrSched/SchedPriorities.cpp
@@ -20,7 +20,6 @@
#include "SchedPriorities.h"
#include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h"
-#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "Support/PostOrderIterator.h"
#include <iostream>
using std::cerr;
@@ -266,24 +265,25 @@ SchedPriorities::findSetWithMaxDelay(std::vector<candIndex>& mcands,
bool
SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo,
const SchedGraphNode* graphNode) {
- const MachineInstr* minstr = graphNode->getMachineInstr();
+ const MachineInstr *MI = graphNode->getMachineInstr();
std::hash_map<const MachineInstr*, bool>::const_iterator
- ui = lastUseMap.find(minstr);
+ ui = lastUseMap.find(MI);
if (ui != lastUseMap.end())
return ui->second;
// else check if instruction is a last use and save it in the hash_map
bool hasLastUse = false;
const BasicBlock* bb = graphNode->getBB();
- const ValueSet &LVs = methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
+ const ValueSet &LVs = methodLiveVarInfo.getLiveVarSetBeforeMInst(MI, bb);
- for (MachineInstr::val_const_op_iterator vo(minstr); !vo.done(); ++vo)
- if (!LVs.count(*vo)) {
+ for (MachineInstr::const_val_op_iterator OI = MI->begin(), OE = MI->end();
+ OI != OE; ++OI)
+ if (!LVs.count(*OI)) {
hasLastUse = true;
break;
}
- return lastUseMap[minstr] = hasLastUse;
+ return lastUseMap[MI] = hasLastUse;
}