[PATCH] D71799: [Attributor] AAUndefinedBehavior: Check for branches on undef value.

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 27 20:54:56 PST 2019


uenoku added a comment.

In D71799#1797725 <https://reviews.llvm.org/D71799#1797725>, @baziotis wrote:

> - `Attributor::getPointerOperand()` and `getPointerOperandOfNonVolatile()`.
> - Removed `AAValueSimplify` for memory accessing instructions.
> - Updated test cases.
>
>   Notes:
> - As it seems, there are multiple instances of `getPointerOperand()` across LLVM. We should probably be careful and not name a function like this, hence I put `getPointerOperand()` as a `static` method of `Attributor`. You may want to check this <http://lists.llvm.org/pipermail/llvm-dev/2018-February/120999.html>, although it's somewhat old and probably outdated.
> - @uenoku I updated the test cases according to what I thought they tried to test. Please verify that they're correct because I may very well have misinterpreted.


Regarding 1, please change to like `getPointerOperand(Instruction *I, bool AllowVolatile)` and merge `getPointerOperandOfNonVolatile` into it.



================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2012
+      const Value *PtrOp = Attributor::getPointerOperand(&I);
+      assert(PtrOp);
 
----------------
Please assert with string.


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

https://reviews.llvm.org/D71799





More information about the llvm-commits mailing list