[PATCH] D29606: PredicateInfo: Handle critical edges

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 12 12:51:28 PST 2017


dberlin added inline comments.


================
Comment at: lib/Transforms/Utils/PredicateInfo.cpp:124-128
+    if (ABlockEdge < BBlockEdge)
+      return true;
+    if (ABlockEdge > BBlockEdge)
+      return false;
+    // Now sort defs before uses
----------------
davide wrote:
> So, in the case `ABlockEdge == `BBBlockEdge` you fall down and use `Def/U` to determine the ordering. 
> Unless I'm missing something, can't this be folded inside the `std::tie()` ? (sorry if I'm terribly mistaken here)
Yes, i believe in this refactored version, we can just shove this in the tie.
Thanks for noticing!


https://reviews.llvm.org/D29606





More information about the llvm-commits mailing list