[llvm] r290420 - [NewGVN] Remove (for now) unused code. NFCI.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 23 02:28:31 PST 2016
Author: davide
Date: Fri Dec 23 04:28:30 2016
New Revision: 290420
URL: http://llvm.org/viewvc/llvm-project?rev=290420&view=rev
Log:
[NewGVN] Remove (for now) unused code. NFCI.
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=290420&r1=290419&r2=290420&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Fri Dec 23 04:28:30 2016
@@ -1129,7 +1129,6 @@ void NewGVN::processOutgoingEdges(Termin
// Remember how many outgoing edges there are to every successor.
SmallDenseMap<BasicBlock *, unsigned, 16> 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(Termin
// 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);
More information about the llvm-commits
mailing list