[PATCH] D71435: [WIP] [Attributor] Function level undefined behavior attribute

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 15 18:43:18 PST 2019


baziotis marked 2 inline comments as done.
baziotis added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1994
+          noUBLoads.insert(I);
+        }
+      }
----------------
jdoerfert wrote:
> jdoerfert wrote:
> > FWIW: Branching on an uninitialized local variable is UB.
> For now just check if the pointer is a constant null and if null is not dereferenceable 
> FWIW: Branching on an uninitialized local variable is UB
Yes, thanks, it was intended to sort of signify that "this is not complete yet, it has to be filled".


================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:1994
+          noUBLoads.insert(I);
+        }
+      }
----------------
baziotis wrote:
> jdoerfert wrote:
> > jdoerfert wrote:
> > > FWIW: Branching on an uninitialized local variable is UB.
> > For now just check if the pointer is a constant null and if null is not dereferenceable 
> > FWIW: Branching on an uninitialized local variable is UB
> Yes, thanks, it was intended to sort of signify that "this is not complete yet, it has to be filled".
> For now just check if the pointer is a constant null and if null is not dereferenceable

I was assuming the first one but in the second one I lost it.
Did you maybe mean "If it is not constant null, check if it is not dereferenceable (i.e. getAAFor<Dereferenceable>)"?


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

https://reviews.llvm.org/D71435





More information about the llvm-commits mailing list