[LLVMdev] Calling-convention lowering proposal

Dan Gohman gohman at apple.com
Thu Apr 23 20:09:19 PDT 2009


Attached is a patch which significantly reworks how calls, incoming
arguments, and outgoing return values are lowered. It's a major change,
affecting all targets, so I'm looking for feedback on the approach.

The goal of the patch is to eliminate a bunch of awkward code,
eliminate some unnecessary differences between targets, and to
facilitate future refactoring and feature work.

This patch gets rid of ISD::CALL, ISD::FORMAL_ARGUMENTS, ISD::RET, and
ISD::ISD::ARG_FLAGS, as well as the old LowerArguments and LowerCallTo
hooks. To replace them, it adds three new TargetLowering hooks:
LowerCall, LowerFormalArguments, and LowerReturn. These hooks provide
targets with the same information as the special nodes, except in an
immediately usable form instead of awkwardly encoded as SDNode
operands. The patch also re-works a substantial portion of the
target-independent tail-call code. The patch also includes changes
for all in-tree targets to use the new hooks.

Beyond dejagnu and some manual assembly output inspection,
so far I've only tested this on x86 targets. I'm not in a hurry
with this; I'm just looking for input at this point.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: calling-conv-lowering.patch
Type: application/octet-stream
Size: 296248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090423/eec17ddf/attachment.obj>

More information about the llvm-dev mailing list