[llvm-commits] [PATCH] Hooks to check if a target can lower call return values

Kenneth Uildriks kennethuil at gmail.com
Fri Oct 30 07:24:41 PDT 2009


This is the first step to get automatic sret-demotion working in the
code generator.  The ultimate goal is to get
SelectionDAGLowering::visitRet and SelectionDAGLowering::LowerCallTo
to check whether a function's struct return is supported by the target
and, if not, to convert the function and calls to it to use an sret
parameter.  This will allow all functions defined to return structs of
any size to be successfully codegen'd.

This patch adds the hooks CanLowerCallResult and CanLowerReturn to
TargetLowering, so that the above-named functions can perform the
check.  The individual targets will need to override these to actually
implement the check with respect to each target.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sret1.patch
Type: application/octet-stream
Size: 2006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20091030/f41172fe/attachment.obj>


More information about the llvm-commits mailing list