This commit adds a parameter that lets us pass in the calling convention
of the call to CallLowering::lowerCall. This allows us to handle
situations where the calling convention of the callee is different from
that of the caller.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hi Diana:
nitpick - typo in commit message 'convetion'.
I see a test for arm but not for aarch64 case. Would it make sense to add one for it as well?
Thanks, Javed
LGTM with the typo fixed and an AArch64 test case (if it's possible).
For the AArch64 test case, I'm not familiar with ARM/AArch64 calling conventions but I'm told that fastcall vs. non-fastcall might be the only way to test it there.
Thanks for reviewing!
I don't think it's possible to add a test using fastcc, because AArch64TargetLowering::CCAssignFnForCall returns the same calling conv for fastcc as for C, PreserveMost etc. The only ones that are different are the calling convs for WebKit_JS (but I think they're moving away from LLVM anyway) and GHC.
I've added a test using ghccc since it's probably better to have an artificial test than no test. I'll commit on Monday if nobody comes up with a better idea.
Ok
I've added a test using ghccc since it's probably better to have an artificial test than no test. I'll commit on Monday if nobody comes up with a better idea.
That sounds good to me, Thanks.