[llvm] [AA] Make getSyncEffects sync-scope aware for pointer arguments (PR #211486)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 03:02:36 PDT 2026


nikic wrote:

I've submitted https://github.com/llvm/llvm-project/pull/211507 to more explicitly spell out the noalias semantics. For noalias pointers, synchronization *inside* the function is useless (unless it is synchronizing accesses that are based-on the noalias pointer, which means it escapes), the synchronization must happen *outside* the function.

I'm not familiar with your use-case and who emits the noalias here (it it a user annotation or compiler generated?) but it's not correct under noalias semantics. One could imagine a weaker variant of noalias that allows arbitrary accesses on other threads, but of course that comes with optimization implications (in particular, such a noalias variant cannot be used for reasoning across function calls).

https://github.com/llvm/llvm-project/pull/211486


More information about the llvm-commits mailing list