diff options
author | Chris Lattner <sabre@nondot.org> | 2002-02-05 04:20:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-02-05 04:20:12 +0000 |
commit | 7e5ee4253cb7b421304e50223443d0cbf874f4af (patch) | |
tree | dffdedd3c29f9afb1dd01531710752919e1e4317 /llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp | |
parent | d30f989cdaf8e996c3c0f0497b50bff4bb649021 (diff) | |
download | bcm5719-llvm-7e5ee4253cb7b421304e50223443d0cbf874f4af.tar.gz bcm5719-llvm-7e5ee4253cb7b421304e50223443d0cbf874f4af.zip |
Minor change: Methods that return ValueSet's that are guaranteed to be valid
return references instead of pointers.
llvm-svn: 1719
Diffstat (limited to 'llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp')
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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; } |