[LLVMdev] [PATCH][RFC] Add extra arguments to TargetLowering::LowerCall() so targets have more context in which to construct call chains

Justin Holewinski jholewinski at nvidia.com
Thu Apr 19 08:07:28 PDT 2012


All,

The attached patch adds two extra arguments to TargetLowering::LowerCall: RetTy and Args.  These arguments are used in TargetLowering::LowerCallTo() to construct the Ins and OutVals parameters, but are not available to the target via LowerCall().  Some targets require this additional information, and the LowerCallTo() method is not virtual in TargetLowering.   Instead of making that method virtual, this patch adds the extra arguments so targets needing this information do not need to replace LowerCallTo() which would lead to a lot of code duplication.  While this does change the API for targets, existing targets can just safely ignore these parameters.  This patch updates the LowerCall() prototypes for all in-tree targets.

We would like to get the community's feedback on this so as to make sure this patch is as universally applicable as possible.  While not currently used in the open-source tree, this patch lays some groundwork for submission of the NVIDIA NVPTX back-end into the open-source tree.


Thanks,

Justin Holewinski


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120419/6b78e106/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-extra-arguments-to-TargetLowering-LowerCall-so-t.patch
Type: application/octet-stream
Size: 19332 bytes
Desc: 0001-Add-extra-arguments-to-TargetLowering-LowerCall-so-t.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120419/6b78e106/attachment.obj>


More information about the llvm-dev mailing list