* Eliminate the LiveVarSet class, making applyTranferFuncForMInst a static
function in the one .cpp file that uses it. Use ValueSet's instead.
* Prepare to delete LiveVarSet.h & LiveVarSet.cpp
* Eliminate the ValueSet class, making all old member functions into global
templates that will eventually be moved to Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1711 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/InstrSched/SchedPriorities.cpp b/lib/CodeGen/InstrSched/SchedPriorities.cpp
index e06f84c..74f6599 100644
--- a/lib/CodeGen/InstrSched/SchedPriorities.cpp
+++ b/lib/CodeGen/InstrSched/SchedPriorities.cpp
@@ -20,7 +20,7 @@
#include "SchedPriorities.h"
#include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h"
-#include "llvm/Analysis/LiveVar/LiveVarSet.h"
+#include "llvm/Analysis/LiveVar/ValueSet.h"
#include "Support/PostOrderIterator.h"
#include <iostream>
using std::cerr;
@@ -265,8 +265,7 @@
bool
SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo,
- const SchedGraphNode* graphNode)
-{
+ const SchedGraphNode* graphNode) {
const MachineInstr* minstr = graphNode->getMachineInstr();
std::hash_map<const MachineInstr*, bool>::const_iterator
@@ -277,15 +276,14 @@
// else check if instruction is a last use and save it in the hash_map
bool hasLastUse = false;
const BasicBlock* bb = graphNode->getBB();
- const LiveVarSet* liveVars =
+ const ValueSet *liveVars =
methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb);
for (MachineInstr::val_const_op_iterator vo(minstr); ! vo.done(); ++vo)
- if (liveVars->find(*vo) == liveVars->end())
- {
- hasLastUse = true;
- break;
- }
+ if (liveVars->find(*vo) == liveVars->end()) {
+ hasLastUse = true;
+ break;
+ }
lastUseMap[minstr] = hasLastUse;
return hasLastUse;