Or at least the sibling call cases which the DAG already handles.
Details
Diff Detail
Event Timeline
It would be nice if we can put the common code with AArch64 into some generic place instead of duplicating it.
Other than that, looks good.
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
960–963 | Checking the register mask seems pretty cheap, while checking argument assignment looks more expensive. | |
1217 | Can this use getStackAlignment() instead of hardcoding 16? | |
1229 | Same about getStackAlignment() | |
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-sibling-call.ll | ||
372–374 | The parent does not use byval. Is this comment correct? |
I left a nit inline. Apart from that, LGTM.
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
1165–1167 | Can this and the assert below use getStackAlignment() instead of hardcoding 16? |
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp | ||
---|---|---|
1177 | The assert should also use getStackAlignment(). |
Checking the register mask seems pretty cheap, while checking argument assignment looks more expensive.
Does it make sense to do this check first? That should bail out faster if the calling conventions don’t match.