This patch implements minimal support for lowering function calls to callees with arguments and/or return values according to the RISC-V calling convention. Integer, pointer and aggregate types are supported.
Feedback is very much appreciated.
Differential D75023
[RISCV][GlobalISel] Add lowerCall for calling convention nitinjohnraj on Feb 23 2020, 11:11 AM. Authored by
Details This patch implements minimal support for lowering function calls to callees with arguments and/or return values according to the RISC-V calling convention. Integer, pointer and aggregate types are supported. Feedback is very much appreciated.
Diff Detail
Event TimelineComment Actions If you're supporting a pointer value return type, should there be a test for this? Other than that, this looks fine to me - although should wait until somebody more experienced looks at it. Side note: Would it be worth, in the future, to outline the process of finding In/OutputArgs and ArgInfos to something like a computeOutgoingArgs/computeIncomingArgs that fills a list of ISD::In/OutputArg and ArgInfos? Or would this just obfuscate things?
Comment Actions Use ValueAssigners to avoid rewriting generic infrastructure and use determineAndHandleAssignments instead.
Comment Actions As stated in the parent revision, we will correctly handle byval, sret and cases where the number of arguments exceed the number of available registers in a future patch.
|