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

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 15:02:48 PST 2019


baziotis marked an inline comment as done.
baziotis added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:1699
+  /// Return true if "undefined behavior" is known.
+  bool isKnownToCauseUB() const { return getKnown(); }
+
----------------
jdoerfert wrote:
> Since we start with a function version only, we probably need to add an `llvm::Instruction` operand here.
> While it makes sense if *every* execution of a function causes UB, the initial implementation will
> answer the questions for a single (load) instruction.
You mean to add a (method) overload for `isKnownToCauseUB`, maybe pure `virtual` that is implemented in `AAUndefinedBehaviorImpl`? It can check if it is a `Load` and if so, check if it is in `UBLoads`.


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

https://reviews.llvm.org/D71435





More information about the llvm-commits mailing list