[PATCH] D122963: [X86] Extend the integer parameter if the function isn't local linked
LiuChen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 22:41:36 PDT 2022
LiuChen3 added a comment.
In D122963#3460934 <https://reviews.llvm.org/D122963#3460934>, @rjmccall wrote:
> If people think that we'll reliably get the right behavior by the frontend adding `sext` and `zext` to call sites but not to function arguments, I can walk you through how to make that change in the frontend.
>
> What we can't do in the frontend is just switch to unconditionally not using `sext` and `zext` at all on x86_64, because we need to maintain compatibility with old versions of clang. But we can introduce a flag that makes clang generate incompatible code if someone wants to opt in to it for performance.
Thanks. @rjmccall . I'd like to hear your approach. If the change in FE is not large, I am willing to do it. But if it is too complicated, I may not be able to do that. Firstly I found we might be able to ignore the attribute in `void CodeGenModule::ConstructAttributeList` in clang/lib/CodeGen/CGCall.cpp , but it is the target independent part, so I gave up.
I agree introducing one new flag.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122963/new/
https://reviews.llvm.org/D122963
More information about the llvm-commits
mailing list