// 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 *liveVars =
- methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
+ const ValueSet &LVs = methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
- for (MachineInstr::val_const_op_iterator vo(minstr); ! vo.done(); ++vo)
- if (liveVars->find(*vo) == liveVars->end()) {
+ for (MachineInstr::val_const_op_iterator vo(minstr); !vo.done(); ++vo)
+ if (!LVs.count(*vo)) {
hasLastUse = true;
break;
}
-
- lastUseMap[minstr] = hasLastUse;
- return hasLastUse;
+
+ return lastUseMap[minstr] = hasLastUse;
}