[PATCH] D22044: [X86] Support of no_caller_saved_registers attribute (LLVM part)
H.J Lu via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 25 08:12:40 PDT 2016
hjl.tools added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:3374
@@ -3365,1 +3373,3 @@
+ // X86_INTR calling convention. Is there a better way to do this?
+ MF, HasNCSR ? CallingConv::X86_INTR: CallConv);
assert(Mask && "Missing call preserved mask for calling convention");
----------------
aaboud wrote:
> qcolombet wrote:
> > The right way to do this, IMO, is to add the calling convention in LLVM like all other ones and have clang/the front-end selects the right calling convention when it sees the attribute.
> > In other words, I don’t think we want to push attribute checking in here.
> Please, correct me if I am mistaken, but calling convention determine not only what the callee and the caller function saved registers are, but also how we move parameters to the called function, right?
> The idea behind no_caller_saved_registers attribute, is that it can be combined with any other calling convention, and it only override the callee/caller saved register list, but not the way parameters are passed to the called function.
>
> So, using a calling convention for this attribute will not be right.
>
> H.J., can you confirm this?
That is correct. no_caller_saved_registers attribute
can be used with any calling conventions.
https://reviews.llvm.org/D22044
More information about the llvm-commits
mailing list