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

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 13:50:56 PST 2019


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

Thanks! LGTM. I can commit this for you if you want. Maybe update the commit message first.

We can do follow up patches for other instructions/situations now. Some ideas:

- Look at stores and other memory accesses.
- Look at branches and other control flow instructions.
- Look at attribute violations, e.g., null is passed but the `nonnull` attribute is present.
- Look not only for null but also for undef, maybe even known dangling pointers (via another attribute).
- Use AAValueSimplify to get an assumed simplified value that we check (that would force us to look at assumed but not known UB instructions every updateImpl call!)
- Implement the function UB analysis that checks if an instruction that is in the "must-be-executed-context" of the function entry is assumed to have UB.

Let me know if you plan to tackle any/all of them.


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

https://reviews.llvm.org/D71435





More information about the llvm-commits mailing list