[PATCH] D123198: [LibCalls] Add argument extension attributes to more functions.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 02:53:56 PDT 2022


xbolva00 added a comment.

In D123198#3442121 <https://reviews.llvm.org/D123198#3442121>, @nikic wrote:

> I think there is a bit of confusion here, because this code (inferLibFuncAttributes) is used for two purposes: To add attributes to existing libcalls, and to add attributes to newly created libcalls. Adding signext/zeroext attributes is not necessary for existing libcalls, because this is a frontend responsibility -- if these attributes are absent (but are required by ABI) then that is a bug in the frontend, and there is no requirement for LLVM to "fix" that problem (though it also doesn't hurt if it does). On the other hand, if LLVM introduces //new// libcalls, then it is LLVM's responsibility to add necessary signext/zeroext attributes.
>
> If we wanted to make that clearer, we could separate out this part to only add these attributes when creating new libcalls. That should also make it obvious that it's fine that this code doesn't run under `O0`, because we only care about libcalls introduced by optimizations.

Yeah!


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

https://reviews.llvm.org/D123198



More information about the llvm-commits mailing list