[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)
commit9ade843ccb88bb1b6266029bce4bb7615b99f669
treeaeb0a536fe007c280c6d0aa4ec1265efe1c6cf5b
parentffab84c7df30a37f64aa942d217f0b78a9d07955
[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
llvm/lib/Analysis/IteratedDominanceFrontier.cpp