[PATCH] D70619: [NFC][LoopFusion] Use isControlFlowEquivalent() from CodeMoverUtils.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 22 20:38:30 PST 2019


Meinersbur accepted this revision.
Meinersbur added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:42
+                                   const PostDominatorTree &PDT) {
+  return ((DT.dominates(&BB0, &BB1) && PDT.dominates(&BB1, &BB0)) ||
+          (PDT.dominates(&BB0, &BB1) && DT.dominates(&BB1, &BB0)));
----------------
[suggestion] Add a shortcut:
```
  if (&BB0 == &BB1)
    return true;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70619/new/

https://reviews.llvm.org/D70619





More information about the llvm-commits mailing list