[PATCH] D98843: [Evaluator] Look through invariant.group intrinsics

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 16:07:46 PDT 2021


aeubanks added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Evaluator.cpp:733
+        if (StrippedPointerCastsForAliasAnalysis &&
+            RI->getReturnValue()->getType()->isPointerTy()) {
+          return false;
----------------
rnk wrote:
> I don't think we can use the LLVM type here as a way to check if any stripped values have leaked out, since ptrtoint exists.
If you have an int derived from a group invariant pointer, it must have been stripped. If you want to cast it back to a pointer and use it, you have to launder it again anyway. The Evaluator isn't changing any existing group invariant intrinsic instructions so I believe it's safe in all cases. I believe the only issue is if we return back an SSA value from the *caller*, which the Evaluator could do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98843



More information about the llvm-commits mailing list