[PATCH] Fix makeLibCall so that we can have LibCalls with a void return value.

Lang Hames lhames at gmail.com
Tue Aug 13 10:26:59 PDT 2013


It might be worth adding a comment to explain what the tuple elements are.
Something like:

/// makeLibCall - returns a pair of (return value, chain)

Other than that this looks good to me.

- Lang.



On Mon, Aug 12, 2013 at 10:51 AM, Michael Gottesman <mgottesman at apple.com>wrote:

> Ping.
>
> On Aug 9, 2013, at 1:16 PM, Michael Gottesman <mgottesman at apple.com>
> wrote:
>
> LowerCallTo returns a tuple consisting of the return SDValue of a call and
> the chain for the call. makeLibCall calls LowerCallTo but only returns the
> return SDValue. This means that any lib call without a return value can not
> be added into SelectionDAG since you are unable to get access to the chain
> of the call.
>
> The attached patch fixes that issue by causing makeLibCall to return the
> tuple from LowerCallTo instead of just the first element. I additionally
> updated all calls to makeLibCall that use the current form to use the new
> from and updated two boolean options (doesNotReturn/isReturnValueUsed) that
> were hard coded as constant arguments to LowerCallTo in makeLibCall into
> two arguments to makeLibCall with default values set to the original hard
> coded constants.
>
> Please review,
> Michael
>
> <0001-Update-makeLibCall-to-return-both-the-call-and-the-c.patch>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130813/9a51c6c0/attachment.html>


More information about the llvm-commits mailing list