Page MenuHomePhabricator

[WIP][RISCV][GlobalISel] Add lowerCall for calling convention
Needs ReviewPublic

Authored by lewis-revill on Feb 23 2020, 11:11 AM.

Details

Summary

This patch implements minimal support for lowering function calls to callees with arguments and/or return values according to the RISC-V calling convention. Simple non-aggregate types are supported. Lowering according to fastcc calling convention is not yet supported.

This patch is work in progress - many cases are not covered yet but feedback is very much appreciated.

Diff Detail

Event Timeline

lewis-revill created this revision.Feb 23 2020, 11:11 AM

Rebase, update test structure. Correct missing defs by adding CallReturnHandler.

Joe added a subscriber: Joe.Mar 17 2020, 5:02 AM

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?

Add test for pointer return type

Bug fix - add target flags to call instruction.

lenary resigned from this revision.Thu, Jan 14, 10:10 AM
rkruppe removed a subscriber: rkruppe.Thu, Jan 14, 10:20 AM