]> granicus.if.org Git - llvm/commitdiff
[NewGVN] Remove dead SwitchEdges variable; NFC
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 22 Jun 2019 10:20:07 +0000 (10:20 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 22 Jun 2019 10:20:07 +0000 (10:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364129 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/NewGVN.cpp

index 412bd235d7994a2ce1b55c86f5056d371cd022d7..efae272f69ae354107269644b7e1d76eb536f598 100644 (file)
@@ -2498,9 +2498,6 @@ void NewGVN::processOutgoingEdges(Instruction *TI, BasicBlock *B) {
     // 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(Instruction *TI, BasicBlock *B) {
     } else {
       for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) {
         BasicBlock *TargetBlock = SI->getSuccessor(i);
-        ++SwitchEdges[TargetBlock];
         updateReachableEdge(B, TargetBlock);
       }
     }