summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2017-02-17 22:12:30 +0000
committerDavide Italiano <davide@freebsd.org>2017-02-17 22:12:30 +0000
commitbca05df38b0122945b58c559c452c03b8e81c2ce (patch)
treebf7cd950fa174ac5f8cf2333deffd2cdf958715b /llvm/lib
parent7db8f42fe33d74afd1ea67b8af539c870277716a (diff)
downloadbcm5719-llvm-bca05df38b0122945b58c559c452c03b8e81c2ce.tar.gz
bcm5719-llvm-bca05df38b0122945b58c559c452c03b8e81c2ce.zip
[NewGVN] isOnlyReachableViaThisEdge() is dead now. NFCI.
llvm-svn: 295503
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index d09a1daf608..6f147d74bbd 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -362,7 +362,6 @@ private:
// Reachability handling.
void updateReachableEdge(BasicBlock *, BasicBlock *);
void processOutgoingEdges(TerminatorInst *, BasicBlock *);
- bool isOnlyReachableViaThisEdge(const BasicBlockEdge &) const;
Value *findConditionEquivalence(Value *) const;
// Elimination.
@@ -1069,23 +1068,6 @@ const Expression *NewGVN::performSymbolicEvaluation(Value *V) {
return E;
}
-// There is an edge from 'Src' to 'Dst'. Return true if every path from
-// the entry block to 'Dst' passes via this edge. In particular 'Dst'
-// must not be reachable via another edge from 'Src'.
-bool NewGVN::isOnlyReachableViaThisEdge(const BasicBlockEdge &E) const {
-
- // While in theory it is interesting to consider the case in which Dst has
- // more than one predecessor, because Dst might be part of a loop which is
- // only reachable from Src, in practice it is pointless since at the time
- // GVN runs all such loops have preheaders, which means that Dst will have
- // been changed to have only one predecessor, namely Src.
- const BasicBlock *Pred = E.getEnd()->getSinglePredecessor();
- const BasicBlock *Src = E.getStart();
- assert((!Pred || Pred == Src) && "No edge between these basic blocks!");
- (void)Src;
- return Pred != nullptr;
-}
-
void NewGVN::markUsersTouched(Value *V) {
// Now mark the users as touched.
for (auto *User : V->users()) {
OpenPOWER on IntegriCloud