diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-08-13 17:54:56 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-08-13 17:54:56 +0000 |
commit | 3add0679d24a00c4a585809c6ce54486f6a458f5 (patch) | |
tree | 16bb1af779b4f9b446e70f88501119f4930564d2 /include | |
parent | 46f0b6f10a6d50ba929f64cc3412bc1c35864a63 (diff) | |
download | external_llvm-3add0679d24a00c4a585809c6ce54486f6a458f5.zip external_llvm-3add0679d24a00c4a585809c6ce54486f6a458f5.tar.gz external_llvm-3add0679d24a00c4a585809c6ce54486f6a458f5.tar.bz2 |
Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void.
LowerCallTo returns a pair with the return value of the call as the first
element and the chain associated with the return value as the second element. If
we lower a call that has a void return value, LowerCallTo returns an SDValue
with a NULL SDNode and the chain for the call. Thus makeLibCall by just
returning the first value makes it impossible for you to set up the chain so
that the call is not eliminated as dead code.
I also updated all references to makeLibCall to reflect the new return type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetLowering.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index c3fa3cc..580a358 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -1702,9 +1702,12 @@ public: SDValue &NewLHS, SDValue &NewRHS, ISD::CondCode &CCCode, SDLoc DL) const; - SDValue makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, EVT RetVT, - const SDValue *Ops, unsigned NumOps, - bool isSigned, SDLoc dl) const; + /// Returns a pair of (return value, chain). + std::pair<SDValue, SDValue> makeLibCall(SelectionDAG &DAG, RTLIB::Libcall LC, + EVT RetVT, const SDValue *Ops, + unsigned NumOps, bool isSigned, + SDLoc dl, bool doesNotReturn = false, + bool isReturnValueUsed = true) const; //===--------------------------------------------------------------------===// // TargetLowering Optimization Methods |