diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2016-04-14 17:45:38 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2016-04-14 17:45:38 +0000 |
commit | cef0fe4245c52d389786455f246475b19c491ac6 (patch) | |
tree | 1608038e60a9ee73fcdd1e3776768bb62ab7ca64 | |
parent | 13d90f324c5169f67fcf72ae39426e2c826b9295 (diff) | |
download | bcm5719-llvm-cef0fe4245c52d389786455f246475b19c491ac6.tar.gz bcm5719-llvm-cef0fe4245c52d389786455f246475b19c491ac6.zip |
[GlobalISel] Move GISelAccessor class into public headers
Reviewers: qcolombet
Subscribers: joker.eph, vkalintiris, llvm-commits
Differential Revision: http://reviews.llvm.org/D19120
llvm-svn: 266348
-rw-r--r-- | llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h (renamed from llvm/lib/Target/AArch64/AArch64GISelAccessor.h) | 10 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64Subtarget.h | 8 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | 12 |
4 files changed, 20 insertions, 20 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64GISelAccessor.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h index b5f22c7f380..7c5ec9f3adc 100644 --- a/llvm/lib/Target/AArch64/AArch64GISelAccessor.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h @@ -1,4 +1,4 @@ -//===-- AArch64GISelAccessor.h - AArch64 GISel Accessor ---------*- C++ -*-===// +//===-- GISelAccessor.h - GISel Accessor ------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===/ -#ifndef LLVM_LIB_TARGET_AARCH64_AARCH64GISELACCESSOR_H -#define LLVM_LIB_TARGET_AARCH64_AARCH64GISELACCESSOR_H +#ifndef LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H +#define LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H namespace llvm { class CallLowering; @@ -24,8 +24,8 @@ class RegisterBankInfo; /// It should be derived to feature an actual accessor to the GISel APIs. /// The reason why this is not simply done into the subtarget is to avoid /// spreading ifdefs around. -struct AArch64GISelAccessor { - virtual ~AArch64GISelAccessor() {} +struct GISelAccessor { + virtual ~GISelAccessor() {} virtual const CallLowering *getCallLowering() const { return nullptr;} virtual const RegisterBankInfo *getRegBankInfo() const { return nullptr;} }; diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp index 72c16638cc6..ce0d98f4ae2 100644 --- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp @@ -57,16 +57,16 @@ 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), GISelAccessor() {} + TLInfo(TM, *this), GISel() {} const CallLowering *AArch64Subtarget::getCallLowering() const { - assert(GISelAccessor && "Access to GlobalISel APIs not set"); - return GISelAccessor->getCallLowering(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getCallLowering(); } const RegisterBankInfo *AArch64Subtarget::getRegBankInfo() const { - assert(GISelAccessor && "Access to GlobalISel APIs not set"); - return GISelAccessor->getRegBankInfo(); + assert(GISel && "Access to GlobalISel APIs not set"); + return GISel->getRegBankInfo(); } /// ClassifyGlobalReference - Find the target operand flags that describe diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.h b/llvm/lib/Target/AArch64/AArch64Subtarget.h index 32c4199ee85..07704112f71 100644 --- a/llvm/lib/Target/AArch64/AArch64Subtarget.h +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.h @@ -15,11 +15,11 @@ #define LLVM_LIB_TARGET_AARCH64_AARCH64SUBTARGET_H #include "AArch64FrameLowering.h" -#include "AArch64GISelAccessor.h" #include "AArch64ISelLowering.h" #include "AArch64InstrInfo.h" #include "AArch64RegisterInfo.h" #include "AArch64SelectionDAGInfo.h" +#include "llvm/CodeGen/GlobalISel/GISelAccessor.h" #include "llvm/IR/DataLayout.h" #include "llvm/Target/TargetSubtargetInfo.h" #include <string> @@ -85,7 +85,7 @@ protected: /// Gather the accessor points to GlobalISel-related APIs. /// This is used to avoid ifndefs spreading around while GISel is /// an optional library. - std::unique_ptr<AArch64GISelAccessor> GISelAccessor; + std::unique_ptr<GISelAccessor> GISel; private: /// initializeSubtargetDependencies - Initializes using CPUString and the @@ -101,8 +101,8 @@ public: bool LittleEndian); /// This object will take onwership of \p GISelAccessor. - void setGISelAccessor(AArch64GISelAccessor &GISelAccessor) { - this->GISelAccessor.reset(&GISelAccessor); + void setGISelAccessor(GISelAccessor &GISel) { + this->GISel.reset(&GISel); } const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override { diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp index 1b8f6f658c7..33f65ceeae6 100644 --- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp +++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp @@ -157,7 +157,7 @@ AArch64TargetMachine::~AArch64TargetMachine() {} #ifdef LLVM_BUILD_GLOBAL_ISEL namespace { -struct AArch64GISelActualAccessor : public AArch64GISelAccessor { +struct AArch64GISelActualAccessor : public GISelAccessor { std::unique_ptr<CallLowering> CallLoweringInfo; std::unique_ptr<RegisterBankInfo> RegBankInfo; const CallLowering *getCallLowering() const override { @@ -191,16 +191,16 @@ AArch64TargetMachine::getSubtargetImpl(const Function &F) const { I = llvm::make_unique<AArch64Subtarget>(TargetTriple, CPU, FS, *this, isLittle); #ifndef LLVM_BUILD_GLOBAL_ISEL - AArch64GISelAccessor *GISelAccessor = new AArch64GISelAccessor(); + GISelAccessor *GISel = new GISelAccessor(); #else - AArch64GISelActualAccessor *GISelAccessor = + AArch64GISelActualAccessor *GISel = new AArch64GISelActualAccessor(); - GISelAccessor->CallLoweringInfo.reset( + GISel->CallLoweringInfo.reset( new AArch64CallLowering(*I->getTargetLowering())); - GISelAccessor->RegBankInfo.reset( + GISel->RegBankInfo.reset( new AArch64RegisterBankInfo(*I->getRegisterInfo())); #endif - I->setGISelAccessor(*GISelAccessor); + I->setGISelAccessor(*GISel); } return I.get(); } |