From 7e5ee4253cb7b421304e50223443d0cbf874f4af Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 5 Feb 2002 04:20:12 +0000 Subject: Minor change: Methods that return ValueSet's that are guaranteed to be valid return references instead of pointers. llvm-svn: 1719 --- llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp') diff --git a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp index 74f659993e2..fed3f941fef 100644 --- a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp +++ b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp @@ -276,16 +276,14 @@ SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo, // 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; } -- cgit v1.2.3