[llvm-dev] Function attributes for memory side-effects

Ejjeh, Adel via llvm-dev llvm-dev at lists.llvm.org
Tue Apr 28 12:57:40 PDT 2020

Hi All

I am writing a pass which requires checking dependences, and am having trouble dealing with function calls. Specifically, I want to be able to know when a called function does not have any side effects (e.g. math library functions like sqrt), and was wondering if there are attributes that specify this behavior (I know there is the ‘noread’ attribute but wasn’t sure if there’s something similar for writes)? Also, how can I tell clang to generate those attributes at the function declaration? Any information would be helpful.

-Adel Ejjeh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200428/883946b2/attachment.html>

More information about the llvm-dev mailing list