[PATCH] D141482: [LVI][CVP] Make use of condition known at use

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 07:12:26 PST 2023


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

LGTM



================
Comment at: llvm/lib/Analysis/LazyValueInfo.cpp:1680
+
+    if (!CurrI->hasOneUse())
+      break;
----------------
nikic wrote:
> StephenFan wrote:
> > Is limiting the number of uses a consideration of compile-time? If we can give it a mutable limit and support handling multiple uses?
> It's a correctness requirement for the current implementation. For multiple uses, we would have to intersect with the union of conditions at all uses. This is more complex, expensive and unlikely to be useful.
Since there was a question about the hasOneUse(), it would be good to include that reasoning as a code comment.


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

https://reviews.llvm.org/D141482



More information about the llvm-commits mailing list