mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 09:53:54 +00:00
[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
This commit is contained in:
parent
8b5e5d6cae
commit
6d6e39d714
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user