diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-03-20 14:40:18 +0000 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-03-20 14:40:18 +0000 |
commit | d79253a9f7833c429fbb3920277e8f2a11f8e1a7 (patch) | |
tree | a8da86c583a9f1dfbe2d5e559a2c8fc0dfe15b80 /llvm/lib/Target/ARM/ARMCallLowering.cpp | |
parent | 00b34996b49748045e2dd77e4f7ca60c258639e2 (diff) | |
download | bcm5719-llvm-d79253a9f7833c429fbb3920277e8f2a11f8e1a7.tar.gz bcm5719-llvm-d79253a9f7833c429fbb3920277e8f2a11f8e1a7.zip |
[GlobalISel] Use the correct calling conv for calls
This commit adds a parameter that lets us pass in the calling convention
of the call to CallLowering::lowerCall. This allows us to handle
situations where the calling convetion of the callee is different from
that of the caller.
Differential Revision: https://reviews.llvm.org/D31039
llvm-svn: 298254
Diffstat (limited to 'llvm/lib/Target/ARM/ARMCallLowering.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMCallLowering.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMCallLowering.cpp b/llvm/lib/Target/ARM/ARMCallLowering.cpp index 4662a5ccf0e..7485aaff49c 100644 --- a/llvm/lib/Target/ARM/ARMCallLowering.cpp +++ b/llvm/lib/Target/ARM/ARMCallLowering.cpp @@ -373,6 +373,7 @@ struct CallReturnHandler : public IncomingValueHandler { } // End anonymous namespace. bool ARMCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, + CallingConv::ID CallConv, const MachineOperand &Callee, const ArgInfo &OrigRet, ArrayRef<ArgInfo> OrigArgs) const { @@ -387,10 +388,6 @@ bool ARMCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, auto CallSeqStart = MIRBuilder.buildInstr(ARM::ADJCALLSTACKDOWN); - // FIXME: This is the calling convention of the caller - we should use the - // calling convention of the callee instead. - auto CallConv = MF.getFunction()->getCallingConv(); - // Create the call instruction so we can add the implicit uses of arg // registers, but don't insert it yet. auto MIB = MIRBuilder.buildInstrNoInsert(ARM::BLX).add(Callee).addRegMask( |