[PATCH] D133111: [LICM] Allow load-only scalar promotion in the presence of unwinding

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 09:18:14 PDT 2022


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

LGTM w/minor comment.



================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1962
   bool FoundLoadToPromote = false;
+  enum {
+    StoreSafe,
----------------
djtodoro wrote:
> ```enum class?
Can you add a quick comment which emphasizes this is a lattice and not an optional bool?  That is, once it falls from unknown to known, it's not every legal to transition from unsafe to safe?  


================
Comment at: llvm/test/Transforms/LICM/scalar-promote-unwind.ll:471
 
 ; The malloc'ed memory can be captured and therefore not promoted.
 define void @malloc_capture(i32** noalias %A) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
----------------
Update comment


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

https://reviews.llvm.org/D133111



More information about the llvm-commits mailing list