diff options
| author | Quentin Colombet <qcolombet@apple.com> | 2017-08-08 22:22:30 +0000 |
|---|---|---|
| committer | Quentin Colombet <qcolombet@apple.com> | 2017-08-08 22:22:30 +0000 |
| commit | 8dd90fb54b2b0c1fd0209ecbbd78c242863e2aa8 (patch) | |
| tree | cb659d4413115dcde1016ffd70e35dc782c2abbb /llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | |
| parent | 3f98fb4a3f3f4bddca99fb897a1888b196508a9a (diff) | |
| download | bcm5719-llvm-8dd90fb54b2b0c1fd0209ecbbd78c242863e2aa8.tar.gz bcm5719-llvm-8dd90fb54b2b0c1fd0209ecbbd78c242863e2aa8.zip | |
Revert "[GlobalISel] Remove the GISelAccessor API."
This reverts commit r310115.
It causes a linker failure for the one of the unittests of AArch64 on one
of the linux bot:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/3429
: && /home/fedora/gcc/install/gcc-7.1.0/bin/g++ -fPIC
-fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W
-Wno-unused-parameter -Wwrite-strings -Wcast-qual
-Wno-missing-field-initializers -pedantic -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment
-ffunction-sections -fdata-sections -O2
-L/home/fedora/gcc/install/gcc-7.1.0/lib64 -Wl,-allow-shlib-undefined
-Wl,-O3 -Wl,--gc-sections
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o -o
unittests/Target/AArch64/AArch64Tests
lib/libLLVMAArch64CodeGen.so.6.0.0svn lib/libLLVMAArch64Desc.so.6.0.0svn
lib/libLLVMAArch64Info.so.6.0.0svn lib/libLLVMCodeGen.so.6.0.0svn
lib/libLLVMCore.so.6.0.0svn lib/libLLVMMC.so.6.0.0svn
lib/libLLVMMIRParser.so.6.0.0svn lib/libLLVMSelectionDAG.so.6.0.0svn
lib/libLLVMTarget.so.6.0.0svn lib/libLLVMSupport.so.6.0.0svn -lpthread
lib/libgtest_main.so.6.0.0svn lib/libgtest.so.6.0.0svn -lpthread
-Wl,-rpath,/home/buildbots/ppc64le-clang-multistage-test/clang-ppc64le-multistage/stage1/lib
&& :
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x0):
undefined reference to `vtable for llvm::LegalizerInfo'
unittests/Target/AArch64/CMakeFiles/AArch64Tests.dir/InstSizes.cpp.o:(.toc+0x8):
undefined reference to `vtable for llvm::RegisterBankInfo'
The particularity of this bot is that it is built with
BUILD_SHARED_LIBS=ON
However, I was not able to reproduce the problem so far.
Reverting to unblock the bot.
llvm-svn: 310425
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h index 8aad97caa97..82d2c543025 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -16,7 +16,6 @@ #define LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H #include "AMDGPU.h" -#include "AMDGPUCallLowering.h" #include "R600FrameLowering.h" #include "R600ISelLowering.h" #include "R600InstrInfo.h" @@ -26,9 +25,7 @@ #include "SIMachineFunctionInfo.h" #include "Utils/AMDGPUBaseInfo.h" #include "llvm/ADT/Triple.h" -#include "llvm/CodeGen/GlobalISel/InstructionSelector.h" -#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h" -#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h" +#include "llvm/CodeGen/GlobalISel/GISelAccessor.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/SelectionDAGTargetInfo.h" #include "llvm/MC/MCInstrItineraries.h" @@ -633,12 +630,7 @@ private: SIInstrInfo InstrInfo; SIFrameLowering FrameLowering; SITargetLowering TLInfo; - - /// GlobalISel related APIs. - std::unique_ptr<AMDGPUCallLowering> CallLoweringInfo; - std::unique_ptr<InstructionSelector> InstSelector; - std::unique_ptr<LegalizerInfo> Legalizer; - std::unique_ptr<RegisterBankInfo> RegBankInfo; + std::unique_ptr<GISelAccessor> GISel; public: SISubtarget(const Triple &TT, StringRef CPU, StringRef FS, @@ -657,25 +649,33 @@ public: } const CallLowering *getCallLowering() const override { - return CallLoweringInfo.get(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getCallLowering(); } const InstructionSelector *getInstructionSelector() const override { - return InstSelector.get(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getInstructionSelector(); } const LegalizerInfo *getLegalizerInfo() const override { - return Legalizer.get(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getLegalizerInfo(); } const RegisterBankInfo *getRegBankInfo() const override { - return RegBankInfo.get(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getRegBankInfo(); } const SIRegisterInfo *getRegisterInfo() const override { return &InstrInfo.getRegisterInfo(); } + void setGISelAccessor(GISelAccessor &GISel) { + this->GISel.reset(&GISel); + } + // XXX - Why is this here if it isn't in the default pass set? bool enableEarlyIfConversion() const override { return true; |

