diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-02-16 00:57:44 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-02-16 00:57:44 +0000 |
commit | 1ce38545fb142740944e5f268ec6c4b543f706f5 (patch) | |
tree | 11796c2764a0a4d3c664dc3dd71916f81bda926e /llvm/lib/Target/AArch64/AArch64Subtarget.cpp | |
parent | 23c89f359a2460f136b6a7115b9e11eac04501ac (diff) | |
download | bcm5719-llvm-1ce38545fb142740944e5f268ec6c4b543f706f5.tar.gz bcm5719-llvm-1ce38545fb142740944e5f268ec6c4b543f706f5.zip |
[GlobalISel] 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: 260922
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64Subtarget.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp index f6ee8cf47a6..2c7f5c0f470 100644 --- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp @@ -57,7 +57,14 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU, StrictAlign(false), ReserveX18(TT.isOSDarwin()), IsLittle(LittleEndian), CPUString(CPU), TargetTriple(TT), FrameLowering(), InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(), - TLInfo(TM, *this) {} + TLInfo(TM, *this), CallLoweringInfo(nullptr) {} + +const CallLowering * +AArch64Subtarget::getCallLowering() const { + if (!CallLoweringInfo) + CallLoweringInfo.reset(new AArch64CallLowering(TLInfo)); + return CallLoweringInfo.get(); +} /// ClassifyGlobalReference - Find the target operand flags that describe /// how a global value should be referenced for the current subtarget. |