From: Nikita Popov Date: Sat, 22 Jun 2019 10:20:07 +0000 (+0000) Subject: [NewGVN] Remove dead SwitchEdges variable; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41cd32ae3afb28f86a62a1234c8bf4784105c24e;p=llvm [NewGVN] Remove dead SwitchEdges variable; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364129 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index 412bd235d79..efae272f69a 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/lib/Transforms/Scalar/NewGVN.cpp @@ -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 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); } }