[PATCH] D138336: [AA] A global cannot escape through nocapture/nocallback call.

Slava Zakharin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 20:11:27 PST 2022


vzakhari updated this revision to Diff 476653.
vzakhari added a comment.

Thank you for the review, Johannes!

I am not sure why the hoisting was legal in the previous version.   I guess it has something to do with the fact that clobbering a part of pointer with -1 may be considering an undefined behavior, so I changed the test to store a pointer inside the loop.
I also added cases with an unknown call, but it cannot be just any unknown call.  Without `nosync` or `nocallback` a call may modify a global even if it was not captured.


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

https://reviews.llvm.org/D138336

Files:
  llvm/lib/Analysis/GlobalsModRef.cpp
  llvm/test/Analysis/GlobalsModRef/noescape-nocapture-nocallback.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138336.476653.patch
Type: text/x-patch
Size: 14086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221119/56d5d20c/attachment.bin>


More information about the llvm-commits mailing list