[PATCH] D109648: [BuildLibCalls] Add globalmemonly to math libcalls that only modify errno

Mugilan Ganesan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 11 11:43:57 PDT 2021


MugilanGN created this revision.
MugilanGN added a reviewer: jdoerfert.
Herald added a subscriber: hiraditya.
MugilanGN requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Certain math libcalls, such as acos and exp, only modify the global variable errno. This automatically adds the globalmemonly attribute to those calls. One use case is in removing unnecessary loads of the call arguments, since the calls will have no side-effects on them.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109648

Files:
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109648.372089.patch
Type: text/x-patch
Size: 8259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210911/3c1b4abb/attachment.bin>


More information about the llvm-commits mailing list