[PATCH] D104689: [LoopDeletion] Benefit from branches by undef conditions when symbolically executing 1st iteration

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 27 13:47:56 PDT 2021


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM. I don't like it, but it's in line with current approaches used elsewhere.



================
Comment at: llvm/lib/Transforms/Scalar/LoopDeletion.cpp:355
+      if (L->contains(IfTrue) && L->contains(IfFalse))
+        MarkLiveEdge(BB, IfTrue);
+      continue;
----------------
aqjune wrote:
> If BB -> IfFalse edge is already live, would it be beneficial if IfFalse is chosen instead?
Blocks are only visited once, so neither edge can be marked live at this point.


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

https://reviews.llvm.org/D104689



More information about the llvm-commits mailing list