[PATCH] D51431: [WIP][IPSCCP] Add lattice value for != constant and propagate nonnull.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 15:59:09 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Transforms/Scalar/SCCP.cpp:844
+    if (IV.isNotConstant())
+      return (void)markOverdefined(&PN);
+
----------------
I guess you could try to resolve a PHI to NotConstant...?  Not sure how important that is.


================
Comment at: lib/Transforms/Scalar/SCCP.cpp:1785
+      IPNumNonNullAdded++;
+      CS.addParamAttr(ArgNo, Attribute::NonNull);
+    }
----------------
I'm not sure this is right: nonnull is UB if the value is null, but SCCP can merge an "Undef" into a NotConstant.


https://reviews.llvm.org/D51431





More information about the llvm-commits mailing list