From fa641c2b8d9ce2123a56de5afcecfa9cac1e5db7 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 23 Dec 2016 10:28:30 +0000 Subject: [PATCH] [NewGVN] Remove (for now) unused code. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290420 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/NewGVN.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index 78752160901..1865d4d05cd 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/lib/Transforms/Scalar/NewGVN.cpp @@ -1129,7 +1129,6 @@ void NewGVN::processOutgoingEdges(TerminatorInst *TI, BasicBlock *B) { // Remember how many outgoing edges there are to every successor. SmallDenseMap SwitchEdges; - bool MultipleEdgesOneReachable = false; Value *SwitchCond = SI->getCondition(); Value *CondEvaluated = findConditionEquivalence(SwitchCond, B); // See if we were able to turn this switch statement into a constant. @@ -1147,17 +1146,6 @@ void NewGVN::processOutgoingEdges(TerminatorInst *TI, BasicBlock *B) { // Now get where it goes and mark it reachable. BasicBlock *TargetBlock = CaseVal.getCaseSuccessor(); updateReachableEdge(B, TargetBlock); - unsigned WhichSucc = CaseVal.getSuccessorIndex(); - // Calculate whether our single reachable edge is really a single edge to - // the target block. If not, and the block has multiple predecessors, we - // can only replace phi node values. - for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) { - if (i == WhichSucc) - continue; - BasicBlock *Block = SI->getSuccessor(i); - if (Block == TargetBlock) - MultipleEdgesOneReachable = true; - } } else { for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) { BasicBlock *TargetBlock = SI->getSuccessor(i); -- 2.11.0