diff options
Diffstat (limited to 'include/llvm/Analysis/SparsePropagation.h')
| -rw-r--r-- | include/llvm/Analysis/SparsePropagation.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index 1b8df03b3a1b..defcf96afb25 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -238,7 +238,7 @@ SparseSolver<LatticeKey, LatticeVal, KeyInfo>::getValueState(LatticeKey Key) { // If this value is untracked, don't add it to the map. if (LV == LatticeFunc->getUntrackedVal()) return LV; - return ValueState[Key] = LV; + return ValueState[Key] = std::move(LV); } template <class LatticeKey, class LatticeVal, class KeyInfo> @@ -250,7 +250,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::UpdateState(LatticeKey Key, // Update the state of the given LatticeKey and add its corresponding LLVM // value to the work list. - ValueState[Key] = LV; + ValueState[Key] = std::move(LV); if (Value *V = KeyInfo::getValueFromLatticeKey(Key)) ValueWorkList.push_back(V); } @@ -260,7 +260,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::MarkBlockExecutable( BasicBlock *BB) { if (!BBExecutable.insert(BB).second) return; - DEBUG(dbgs() << "Marking Block Executable: " << BB->getName() << "\n"); + LLVM_DEBUG(dbgs() << "Marking Block Executable: " << BB->getName() << "\n"); BBWorkList.push_back(BB); // Add the block to the work list! } @@ -270,8 +270,8 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::markEdgeExecutable( if (!KnownFeasibleEdges.insert(Edge(Source, Dest)).second) return; // This edge is already known to be executable! - DEBUG(dbgs() << "Marking Edge Executable: " << Source->getName() << " -> " - << Dest->getName() << "\n"); + LLVM_DEBUG(dbgs() << "Marking Edge Executable: " << Source->getName() + << " -> " << Dest->getName() << "\n"); if (BBExecutable.count(Dest)) { // The destination is already executable, but we just made an edge @@ -318,7 +318,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::getFeasibleSuccessors( Constant *C = dyn_cast_or_null<Constant>(LatticeFunc->GetValueFromLatticeVal( - BCValue, BI->getCondition()->getType())); + std::move(BCValue), BI->getCondition()->getType())); if (!C || !isa<ConstantInt>(C)) { // Non-constant values can go either way. Succs[0] = Succs[1] = true; @@ -360,7 +360,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::getFeasibleSuccessors( return; Constant *C = dyn_cast_or_null<Constant>(LatticeFunc->GetValueFromLatticeVal( - SCValue, SI.getCondition()->getType())); + std::move(SCValue), SI.getCondition()->getType())); if (!C || !isa<ConstantInt>(C)) { // All destinations are executable! Succs.assign(TI.getNumSuccessors(), true); @@ -408,7 +408,8 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::visitPHINode(PHINode &PN) { LatticeFunc->ComputeInstructionState(PN, ChangedValues, *this); for (auto &ChangedValue : ChangedValues) if (ChangedValue.second != LatticeFunc->getUntrackedVal()) - UpdateState(ChangedValue.first, ChangedValue.second); + UpdateState(std::move(ChangedValue.first), + std::move(ChangedValue.second)); return; } @@ -477,7 +478,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::Solve() { Value *V = ValueWorkList.back(); ValueWorkList.pop_back(); - DEBUG(dbgs() << "\nPopped off V-WL: " << *V << "\n"); + LLVM_DEBUG(dbgs() << "\nPopped off V-WL: " << *V << "\n"); // "V" got into the work list because it made a transition. See if any // users are both live and in need of updating. @@ -492,7 +493,7 @@ void SparseSolver<LatticeKey, LatticeVal, KeyInfo>::Solve() { BasicBlock *BB = BBWorkList.back(); BBWorkList.pop_back(); - DEBUG(dbgs() << "\nPopped off BBWL: " << *BB); + LLVM_DEBUG(dbgs() << "\nPopped off BBWL: " << *BB); // Notify all instructions in this basic block that they are newly // executable. |
