summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-03-07 11:42:59 +0000
committerFangrui Song <maskray@google.com>2019-03-07 11:42:59 +0000
commit9ade843ccb88bb1b6266029bce4bb7615b99f669 (patch)
treeaeb0a536fe007c280c6d0aa4ec1265efe1c6cf5b /llvm/lib/Analysis
parentffab84c7df30a37f64aa942d217f0b78a9d07955 (diff)
downloadbcm5719-llvm-9ade843ccb88bb1b6266029bce4bb7615b99f669.tar.gz
bcm5719-llvm-9ade843ccb88bb1b6266029bce4bb7615b99f669.zip
[IDF] Delete a redundant J-edge test
In the DJ-graph based computation of iterated dominance frontiers, SuccNode->getIDom() == Node is one of the tests to check if (Node,Succ) is a J-edge. If it is true, since Node is dominated by Root, SuccLevel = level(Node)+1 > RootLevel which means the next test SuccLevel > RootLevel will also be true. test the check is redundant and can be deleted as it also involves one indirection and provides no speed-up. llvm-svn: 355589
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/IteratedDominanceFrontier.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/IteratedDominanceFrontier.cpp b/llvm/lib/Analysis/IteratedDominanceFrontier.cpp
index 307bb29db15..89257121c6a 100644
--- a/llvm/lib/Analysis/IteratedDominanceFrontier.cpp
+++ b/llvm/lib/Analysis/IteratedDominanceFrontier.cpp
@@ -64,11 +64,6 @@ void IDFCalculator<NodeTy, IsPostDom>::calculate(
auto DoWork = [&](BasicBlock *Succ) {
DomTreeNode *SuccNode = DT.getNode(Succ);
- // Quickly skip all CFG edges that are also dominator tree edges instead
- // of catching them below.
- if (SuccNode->getIDom() == Node)
- return;
-
const unsigned SuccLevel = SuccNode->getLevel();
if (SuccLevel > RootLevel)
return;
OpenPOWER on IntegriCloud