Context can be found here:
RFC: Implementing the Swift calling convention in LLVM and Clang
https://groups.google.com/forum/#!topic/llvm-dev/epDd2w93kZ0
Details
Diff Detail
Event Timeline
Is this the special "context" argument that John mentioned? R10 is not a CSR on x86_64.
lib/Target/AArch64/AArch64CallingConvention.td | ||
---|---|---|
129 | "A SwitfSelf" maybe? | |
lib/Target/ARM/ARMCallingConv.td | ||
26 | ditto, and elsewhere | |
test/CodeGen/X86/swiftself.ll | ||
2 | It seems you have no special rules for passing a 32-bit swiftself. That makes sense, I don't imagine you care about x86_32 swift performance. Can you add a RUN line that shows it being spilled to the stack as usual, though? I assume you'll want the ABI for it to be stable. |
Hi Reid,
Thanks for reviewing!
Yes, this is the "context/self" argument. This patch does not actually use a CSR because of the complications in the backend to use a CSR to pass an argument.
We are trying to improve this by improving the backend to handle this.
Cheers,
Manman
lib/Target/AArch64/AArch64CallingConvention.td | ||
---|---|---|
129 | Will do :] | |
test/CodeGen/X86/swiftself.ll | ||
2 | You are right. I will make sure it works as designed on 32-bit. |
include/llvm/Target/TargetCallingConv.h | ||
---|---|---|
87 | Typo here: Flags |= ... |
Yep, looks good.
test/Bitcode/swiftself.ll | ||
---|---|---|
2 | Can you merge this into attributes.ll? Each new test file has a small cost, and this fits in with the existing test there. |
llvm/trunk/test/CodeGen/AArch64/swiftself.ll | ||
---|---|---|
1–2 ↗ | (On Diff #51950) | CHECK-APPLE and CHECK-O0 appear to be checking the same why not just use CHECK? The same situations applies to the other tests. |
Typo here: Flags |= ...