diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-02-16 19:26:02 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-02-16 19:26:02 +0000 |
commit | ba2a01645b54020f6f852edddd1e40d3a096e093 (patch) | |
tree | 122144e455d8a7c4f2d5629c1c80fdceddf00c50 /llvm/lib/CodeGen | |
parent | b75dd0c9a936112d898523291834482585921b03 (diff) | |
download | bcm5719-llvm-ba2a01645b54020f6f852edddd1e40d3a096e093.tar.gz bcm5719-llvm-ba2a01645b54020f6f852edddd1e40d3a096e093.zip |
[GlobalISel] Re-apply r260922-260923 with MSVC-friendly code.
Original message:
Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
llvm-svn: 260998
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index ffbda5ba591..8b9a5b5bf04 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -13,6 +13,7 @@ #include "llvm/CodeGen/GlobalISel/IRTranslator.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/CodeGen/GlobalISel/CallLowering.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/IR/Constant.h" @@ -75,8 +76,7 @@ bool IRTranslator::translateReturn(const Instruction &Inst) { // The target may mess up with the insertion point, but // this is not important as a return is the last instruction // of the block anyway. - return TLI->LowerReturn(MIRBuilder, Ret, - !Ret ? 0 : getOrCreateVReg(Ret)); + return CLI->LowerReturn(MIRBuilder, Ret, !Ret ? 0 : getOrCreateVReg(Ret)); } bool IRTranslator::translate(const Instruction &Inst) { @@ -104,7 +104,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { const Function &F = *MF.getFunction(); if (F.empty()) return false; - TLI = MF.getSubtarget().getTargetLowering(); + CLI = MF.getSubtarget().getCallLowering(); MIRBuilder.setFunction(MF); MRI = &MF.getRegInfo(); // Setup the arguments. @@ -113,8 +113,8 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { SmallVector<unsigned, 8> VRegArgs; for (const Argument &Arg: F.args()) VRegArgs.push_back(getOrCreateVReg(&Arg)); - bool Succeeded = TLI->LowerFormalArguments(MIRBuilder, F.getArgumentList(), - VRegArgs); + bool Succeeded = + CLI->LowerFormalArguments(MIRBuilder, F.getArgumentList(), VRegArgs); if (!Succeeded) report_fatal_error("Unable to lower arguments"); |