Update makeLibCall to return both the call and the chain associated with the libcall...
authorMichael Gottesman <mgottesman@apple.com>
Tue, 13 Aug 2013 17:54:56 +0000 (17:54 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Tue, 13 Aug 2013 17:54:56 +0000 (17:54 +0000)
commit3add0679d24a00c4a585809c6ce54486f6a458f5
tree16bb1af779b4f9b446e70f88501119f4930564d2
parent46f0b6f10a6d50ba929f64cc3412bc1c35864a63
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
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp