[llvm] r364129 - [NewGVN] Remove dead SwitchEdges variable; NFC
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 22 03:20:07 PDT 2019
Author: nikic
Date: Sat Jun 22 03:20:07 2019
New Revision: 364129
URL: http://llvm.org/viewvc/llvm-project?rev=364129&view=rev
Log:
[NewGVN] Remove dead SwitchEdges variable; NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=364129&r1=364128&r2=364129&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Sat Jun 22 03:20:07 2019
@@ -2498,9 +2498,6 @@ void NewGVN::processOutgoingEdges(Instru
// For switches, propagate the case values into the case
// destinations.
- // Remember how many outgoing edges there are to every successor.
- SmallDenseMap<BasicBlock *, unsigned, 16> SwitchEdges;
-
Value *SwitchCond = SI->getCondition();
Value *CondEvaluated = findConditionEquivalence(SwitchCond);
// See if we were able to turn this switch statement into a constant.
@@ -2521,7 +2518,6 @@ void NewGVN::processOutgoingEdges(Instru
} else {
for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) {
BasicBlock *TargetBlock = SI->getSuccessor(i);
- ++SwitchEdges[TargetBlock];
updateReachableEdge(B, TargetBlock);
}
}
More information about the llvm-commits
mailing list