]> granicus.if.org Git - llvm/commit
[IDF] Delete a redundant J-edge test
authorFangrui Song <maskray@google.com>
Thu, 7 Mar 2019 11:42:59 +0000 (11:42 +0000)
committerFangrui Song <maskray@google.com>
Thu, 7 Mar 2019 11:42:59 +0000 (11:42 +0000)
commite44e91e1f0f1952ff6f3e2e82acdf918491535de
tree40677f91bbe388719ae75c013a5f5f43b216a6ec
parent9bfa70bdc5a0e9f9a76f113a342e0657ab4935e3
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355589 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/IteratedDominanceFrontier.cpp