[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
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev