Change makeLibCall to return both the generated call and the chain instead of just the call.
Michael Gottesman
mgottesman at apple.com
Mon Jul 22 13:05:33 PDT 2013
This is the first patch in a series of patches to stop stack protector insertion from disrupting sibling calls.
The attached patch changes makeLibCall to return the std::pair generated by LowerCallTo instead of just returning the first argument, i.e.:
- std::pair<SDValue,SDValue> CallInfo = LowerCallTo(CLI);
-
- return CallInfo.first;
+ return LowerCallTo(CLI);
This enables one to create lib calls with a void return value and use the chain to attach said call appropriately to the DAG so that the call is not eliminated as dead code.
It additionally:
1. Updates every current call to makeLibCall from makeLibCall(…) -> makeLibCall(…).first.
2. Exposes 3 boolean options to CallLowerInterface in makeLibCall as arguments with their current constant value as their default value. They are:
a. isTailCall.
b. doesNotReturn.
c. isReturnValueUsed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-makeLibCall-to-return-both-the-call-and-the-c.patch
Type: application/octet-stream
Size: 29164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130722/0fa11e4d/attachment.obj>
-------------- next part --------------
Please review,
Michael
<rdar://problem/13935163>
More information about the llvm-commits
mailing list