llvm.org GIT mirror llvm / f6b5ea7
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310425 91177308-0d34-0410-b5e6-96231b3b80d8 Quentin Colombet 2 years ago
10 changed file(s) with 242 addition(s) and 76 deletion(s). Raw diff Collapse all Expand all
632632
633633 * ``TargetPassConfig`` --- create the passes constituting the pipeline,
634634 including additional passes not included in the :ref:`pipeline`.
635 * ``GISelAccessor`` --- setup the various subtarget-provided classes, with a
636 graceful fallback to no-op when GlobalISel isn't enabled.
0 //===-- GISelAccessor.h - GISel Accessor ------------------------*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// This file declares the API to access the various APIs related
10 /// to GlobalISel.
11 //
12 //===----------------------------------------------------------------------===/
13
14 #ifndef LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H
15 #define LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H
16
17 namespace llvm {
18 class CallLowering;
19 class InstructionSelector;
20 class LegalizerInfo;
21 class RegisterBankInfo;
22
23 /// The goal of this helper class is to gather the accessor to all
24 /// the APIs related to GlobalISel.
25 /// It should be derived to feature an actual accessor to the GISel APIs.
26 /// The reason why this is not simply done into the subtarget is to avoid
27 /// spreading ifdefs around.
28 struct GISelAccessor {
29 virtual ~GISelAccessor() {}
30 virtual const CallLowering *getCallLowering() const { return nullptr;}
31 virtual const InstructionSelector *getInstructionSelector() const {
32 return nullptr;
33 }
34 virtual const LegalizerInfo *getLegalizerInfo() const { return nullptr; }
35 virtual const RegisterBankInfo *getRegBankInfo() const { return nullptr;}
36 };
37 } // End namespace llvm;
38 #endif
2020 #include "AArch64CallLowering.h"
2121 #include "AArch64LegalizerInfo.h"
2222 #include "AArch64RegisterBankInfo.h"
23 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
2324 #include "llvm/CodeGen/GlobalISel/IRTranslator.h"
2425 #include "llvm/CodeGen/GlobalISel/InstructionSelect.h"
2526 #include "llvm/CodeGen/GlobalISel/Legalizer.h"
139140 }
140141 }
141142
143 namespace {
144
145 struct AArch64GISelActualAccessor : public GISelAccessor {
146 std::unique_ptr CallLoweringInfo;
147 std::unique_ptr InstSelector;
148 std::unique_ptr Legalizer;
149 std::unique_ptr RegBankInfo;
150
151 const CallLowering *getCallLowering() const override {
152 return CallLoweringInfo.get();
153 }
154
155 const InstructionSelector *getInstructionSelector() const override {
156 return InstSelector.get();
157 }
158
159 const LegalizerInfo *getLegalizerInfo() const override {
160 return Legalizer.get();
161 }
162
163 const RegisterBankInfo *getRegBankInfo() const override {
164 return RegBankInfo.get();
165 }
166 };
167
168 } // end anonymous namespace
169
142170 AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU,
143171 const std::string &FS,
144172 const TargetMachine &TM, bool LittleEndian)
145173 : AArch64GenSubtargetInfo(TT, CPU, FS),
146 ReserveX18(TT.isOSDarwin() || TT.isOSWindows()), IsLittle(LittleEndian),
147 TargetTriple(TT), FrameLowering(),
174 ReserveX18(TT.isOSDarwin() || TT.isOSWindows()),
175 IsLittle(LittleEndian), TargetTriple(TT), FrameLowering(),
148176 InstrInfo(initializeSubtargetDependencies(FS, CPU)), TSInfo(),
149 TLInfo(TM, *this) {
150 CallLoweringInfo.reset(new AArch64CallLowering(*getTargetLowering()));
151 Legalizer.reset(new AArch64LegalizerInfo());
177 TLInfo(TM, *this), GISel() {
178 AArch64GISelActualAccessor *AArch64GISel = new AArch64GISelActualAccessor();
179 AArch64GISel->CallLoweringInfo.reset(
180 new AArch64CallLowering(*getTargetLowering()));
181 AArch64GISel->Legalizer.reset(new AArch64LegalizerInfo());
152182
153183 auto *RBI = new AArch64RegisterBankInfo(*getRegisterInfo());
154184
155185 // FIXME: At this point, we can't rely on Subtarget having RBI.
156186 // It's awkward to mix passing RBI and the Subtarget; should we pass
157187 // TII/TRI as well?
158 InstSelector.reset(createAArch64InstructionSelector(
188 AArch64GISel->InstSelector.reset(createAArch64InstructionSelector(
159189 *static_cast(&TM), *this, *RBI));
160190
161 RegBankInfo.reset(RBI);
191 AArch64GISel->RegBankInfo.reset(RBI);
192 setGISelAccessor(*AArch64GISel);
162193 }
163194
164195 const CallLowering *AArch64Subtarget::getCallLowering() const {
165 return CallLoweringInfo.get();
196 assert(GISel && "Access to GlobalISel APIs not set");
197 return GISel->getCallLowering();
166198 }
167199
168200 const InstructionSelector *AArch64Subtarget::getInstructionSelector() const {
169 return InstSelector.get();
201 assert(GISel && "Access to GlobalISel APIs not set");
202 return GISel->getInstructionSelector();
170203 }
171204
172205 const LegalizerInfo *AArch64Subtarget::getLegalizerInfo() const {
173 return Legalizer.get();
206 assert(GISel && "Access to GlobalISel APIs not set");
207 return GISel->getLegalizerInfo();
174208 }
175209
176210 const RegisterBankInfo *AArch64Subtarget::getRegBankInfo() const {
177 return RegBankInfo.get();
211 assert(GISel && "Access to GlobalISel APIs not set");
212 return GISel->getRegBankInfo();
178213 }
179214
180215 /// Find the target operand flags that describe how a global value should be
1818 #include "AArch64InstrInfo.h"
1919 #include "AArch64RegisterInfo.h"
2020 #include "AArch64SelectionDAGInfo.h"
21 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
22 #include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
23 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
24 #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
21 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
2522 #include "llvm/IR/DataLayout.h"
2623 #include "llvm/Target/TargetSubtargetInfo.h"
2724 #include
126123 AArch64InstrInfo InstrInfo;
127124 AArch64SelectionDAGInfo TSInfo;
128125 AArch64TargetLowering TLInfo;
129
130 /// GlobalISel related APIs.
131 std::unique_ptr CallLoweringInfo;
132 std::unique_ptr InstSelector;
133 std::unique_ptr Legalizer;
134 std::unique_ptr RegBankInfo;
126 /// Gather the accessor points to GlobalISel-related APIs.
127 /// This is used to avoid ifndefs spreading around while GISel is
128 /// an optional library.
129 std::unique_ptr GISel;
135130
136131 private:
137132 /// initializeSubtargetDependencies - Initializes using CPUString and the
149144 AArch64Subtarget(const Triple &TT, const std::string &CPU,
150145 const std::string &FS, const TargetMachine &TM,
151146 bool LittleEndian);
147
148 /// This object will take onwership of \p GISelAccessor.
149 void setGISelAccessor(GISelAccessor &GISel) {
150 this->GISel.reset(&GISel);
151 }
152152
153153 const AArch64SelectionDAGInfo *getSelectionDAGInfo() const override {
154154 return &TSInfo;
8888
8989 return *this;
9090 }
91
92 namespace {
93
94 struct SIGISelActualAccessor : public GISelAccessor {
95 std::unique_ptr CallLoweringInfo;
96 std::unique_ptr InstSelector;
97 std::unique_ptr Legalizer;
98 std::unique_ptr RegBankInfo;
99 const AMDGPUCallLowering *getCallLowering() const override {
100 return CallLoweringInfo.get();
101 }
102 const InstructionSelector *getInstructionSelector() const override {
103 return InstSelector.get();
104 }
105 const LegalizerInfo *getLegalizerInfo() const override {
106 return Legalizer.get();
107 }
108 const RegisterBankInfo *getRegBankInfo() const override {
109 return RegBankInfo.get();
110 }
111 };
112
113 } // end anonymous namespace
91114
92115 AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
93116 const TargetMachine &TM)
341364 : AMDGPUSubtarget(TT, GPU, FS, TM), InstrInfo(*this),
342365 FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0),
343366 TLInfo(TM, *this) {
344 CallLoweringInfo.reset(new AMDGPUCallLowering(*getTargetLowering()));
345 Legalizer.reset(new AMDGPULegalizerInfo());
346
347 RegBankInfo.reset(new AMDGPURegisterBankInfo(*getRegisterInfo()));
348 InstSelector.reset(new AMDGPUInstructionSelector(
349 *this, *static_cast(RegBankInfo.get())));
367 SIGISelActualAccessor *GISel = new SIGISelActualAccessor();
368 GISel->CallLoweringInfo.reset(new AMDGPUCallLowering(*getTargetLowering()));
369 GISel->Legalizer.reset(new AMDGPULegalizerInfo());
370
371 GISel->RegBankInfo.reset(new AMDGPURegisterBankInfo(*getRegisterInfo()));
372 GISel->InstSelector.reset(new AMDGPUInstructionSelector(
373 *this, *static_cast(GISel->RegBankInfo.get())));
374 setGISelAccessor(*GISel);
350375 }
351376
352377 void SISubtarget::overrideSchedPolicy(MachineSchedPolicy &Policy,
1515 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUSUBTARGET_H
1616
1717 #include "AMDGPU.h"
18 #include "AMDGPUCallLowering.h"
1918 #include "R600FrameLowering.h"
2019 #include "R600ISelLowering.h"
2120 #include "R600InstrInfo.h"
2524 #include "SIMachineFunctionInfo.h"
2625 #include "Utils/AMDGPUBaseInfo.h"
2726 #include "llvm/ADT/Triple.h"
28 #include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
29 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
30 #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
27 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
3128 #include "llvm/CodeGen/MachineFunction.h"
3229 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
3330 #include "llvm/MC/MCInstrItineraries.h"
632629 SIInstrInfo InstrInfo;
633630 SIFrameLowering FrameLowering;
634631 SITargetLowering TLInfo;
635
636 /// GlobalISel related APIs.
637 std::unique_ptr CallLoweringInfo;
638 std::unique_ptr InstSelector;
639 std::unique_ptr Legalizer;
640 std::unique_ptr<RegisterBankInfo> RegBankInfo;
632 std::unique_ptr<GISelAccessor> GISel;
641633
642634 public:
643635 SISubtarget(const Triple &TT, StringRef CPU, StringRef FS,
656648 }
657649
658650 const CallLowering *getCallLowering() const override {
659 return CallLoweringInfo.get();
651 assert(GISel && "Access to GlobalISel APIs not set");
652 return GISel->getCallLowering();
660653 }
661654
662655 const InstructionSelector *getInstructionSelector() const override {
663 return InstSelector.get();
656 assert(GISel && "Access to GlobalISel APIs not set");
657 return GISel->getInstructionSelector();
664658 }
665659
666660 const LegalizerInfo *getLegalizerInfo() const override {
667 return Legalizer.get();
661 assert(GISel && "Access to GlobalISel APIs not set");
662 return GISel->getLegalizerInfo();
668663 }
669664
670665 const RegisterBankInfo *getRegBankInfo() const override {
671 return RegBankInfo.get();
666 assert(GISel && "Access to GlobalISel APIs not set");
667 return GISel->getRegBankInfo();
672668 }
673669
674670 const SIRegisterInfo *getRegisterInfo() const override {
675671 return &InstrInfo.getRegisterInfo();
672 }
673
674 void setGISelAccessor(GISelAccessor &GISel) {
675 this->GISel.reset(&GISel);
676676 }
677677
678678 // XXX - Why is this here if it isn't in the default pass set?
2727 #include "llvm/ADT/StringRef.h"
2828 #include "llvm/ADT/Triple.h"
2929 #include "llvm/ADT/Twine.h"
30 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
3031 #include "llvm/CodeGen/GlobalISel/IRTranslator.h"
3132 #include "llvm/CodeGen/GlobalISel/InstructionSelect.h"
3233 #include "llvm/CodeGen/GlobalISel/Legalizer.h"
9495
9596 return new ARMFrameLowering(STI);
9697 }
98
99 namespace {
100
101 struct ARMGISelActualAccessor : public GISelAccessor {
102 std::unique_ptr CallLoweringInfo;
103 std::unique_ptr InstSelector;
104 std::unique_ptr Legalizer;
105 std::unique_ptr RegBankInfo;
106
107 const CallLowering *getCallLowering() const override {
108 return CallLoweringInfo.get();
109 }
110
111 const InstructionSelector *getInstructionSelector() const override {
112 return InstSelector.get();
113 }
114
115 const LegalizerInfo *getLegalizerInfo() const override {
116 return Legalizer.get();
117 }
118
119 const RegisterBankInfo *getRegBankInfo() const override {
120 return RegBankInfo.get();
121 }
122 };
123
124 } // end anonymous namespace
97125
98126 ARMSubtarget::ARMSubtarget(const Triple &TT, const std::string &CPU,
99127 const std::string &FS,
112140 assert((isThumb() || hasARMOps()) &&
113141 "Target must either be thumb or support ARM operations!");
114142
115 CallLoweringInfo.reset(new ARMCallLowering(*getTargetLowering()));
116 Legalizer.reset(new ARMLegalizerInfo(*this));
143 ARMGISelActualAccessor *GISel = new ARMGISelActualAccessor();
144 GISel->CallLoweringInfo.reset(new ARMCallLowering(*getTargetLowering()));
145 GISel->Legalizer.reset(new ARMLegalizerInfo(*this));
117146
118147 auto *RBI = new ARMRegisterBankInfo(*getRegisterInfo());
119148
120149 // FIXME: At this point, we can't rely on Subtarget having RBI.
121150 // It's awkward to mix passing RBI and the Subtarget; should we pass
122151 // TII/TRI as well?
123 InstSelector.reset(createARMInstructionSelector(
152 GISel->InstSelector.reset(createARMInstructionSelector(
124153 *static_cast(&TM), *this, *RBI));
125154
126 RegBankInfo.reset(RBI);
155 GISel->RegBankInfo.reset(RBI);
156 setGISelAccessor(*GISel);
127157 }
128158
129159 const CallLowering *ARMSubtarget::getCallLowering() const {
130 return CallLoweringInfo.get();
160 assert(GISel && "Access to GlobalISel APIs not set");
161 return GISel->getCallLowering();
131162 }
132163
133164 const InstructionSelector *ARMSubtarget::getInstructionSelector() const {
134 return InstSelector.get();
165 assert(GISel && "Access to GlobalISel APIs not set");
166 return GISel->getInstructionSelector();
135167 }
136168
137169 const LegalizerInfo *ARMSubtarget::getLegalizerInfo() const {
138 return Legalizer.get();
170 assert(GISel && "Access to GlobalISel APIs not set");
171 return GISel->getLegalizerInfo();
139172 }
140173
141174 const RegisterBankInfo *ARMSubtarget::getRegBankInfo() const {
142 return RegBankInfo.get();
175 assert(GISel && "Access to GlobalISel APIs not set");
176 return GISel->getRegBankInfo();
143177 }
144178
145179 bool ARMSubtarget::isXRaySupported() const {
1919 #include "ARMISelLowering.h"
2020 #include "ARMSelectionDAGInfo.h"
2121 #include "llvm/ADT/Triple.h"
22 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
23 #include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
24 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
25 #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
22 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
2623 #include "llvm/CodeGen/MachineFunction.h"
2724 #include "llvm/MC/MCInstrItineraries.h"
2825 #include "llvm/MC/MCSchedule.h"
421418 ARMSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
422419 const ARMBaseTargetMachine &TM, bool IsLittle);
423420
421 /// This object will take onwership of \p GISelAccessor.
422 void setGISelAccessor(GISelAccessor &GISel) { this->GISel.reset(&GISel); }
423
424424 /// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size
425425 /// that still makes it profitable to inline the call.
426426 unsigned getMaxInlineSizeThreshold() const {
468468 std::unique_ptr InstrInfo;
469469 ARMTargetLowering TLInfo;
470470
471 /// GlobalISel related APIs.
472 std::unique_ptr CallLoweringInfo;
473 std::unique_ptr InstSelector;
474 std::unique_ptr Legalizer;
475 std::unique_ptr RegBankInfo;
471 /// Gather the accessor points to GlobalISel-related APIs.
472 /// This is used to avoid ifndefs spreading around while GISel is
473 /// an optional library.
474 std::unique_ptr GISel;
476475
477476 void initializeEnvironment();
478477 void initSubtargetFeatures(StringRef CPU, StringRef FS);
352352 return *this;
353353 }
354354
355 namespace {
356
357 struct X86GISelActualAccessor : public GISelAccessor {
358 std::unique_ptr CallLoweringInfo;
359 std::unique_ptr Legalizer;
360 std::unique_ptr RegBankInfo;
361 std::unique_ptr InstSelector;
362
363 const CallLowering *getCallLowering() const override {
364 return CallLoweringInfo.get();
365 }
366
367 const InstructionSelector *getInstructionSelector() const override {
368 return InstSelector.get();
369 }
370
371 const LegalizerInfo *getLegalizerInfo() const override {
372 return Legalizer.get();
373 }
374
375 const RegisterBankInfo *getRegBankInfo() const override {
376 return RegBankInfo.get();
377 }
378 };
379
380 } // end anonymous namespace
381
355382 X86Subtarget::X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS,
356383 const X86TargetMachine &TM,
357384 unsigned StackAlignOverride)
376403 setPICStyle(PICStyles::StubPIC);
377404 else if (isTargetELF())
378405 setPICStyle(PICStyles::GOT);
379
380 CallLoweringInfo.reset(new X86CallLowering(*getTargetLowering()));
381 Legalizer.reset(new X86LegalizerInfo(*this, TM));
406 X86GISelActualAccessor *GISel = new X86GISelActualAccessor();
407
408 GISel->CallLoweringInfo.reset(new X86CallLowering(*getTargetLowering()));
409 GISel->Legalizer.reset(new X86LegalizerInfo(*this, TM));
382410
383411 auto *RBI = new X86RegisterBankInfo(*getRegisterInfo());
384 RegBankInfo.reset(RBI);
385 InstSelector.reset(createX86InstructionSelector(TM, *this, *RBI));
412 GISel->RegBankInfo.reset(RBI);
413 GISel->InstSelector.reset(createX86InstructionSelector(TM, *this, *RBI));
414 setGISelAccessor(*GISel);
386415 }
387416
388417 const CallLowering *X86Subtarget::getCallLowering() const {
389 return CallLoweringInfo.get();
418 assert(GISel && "Access to GlobalISel APIs not set");
419 return GISel->getCallLowering();
390420 }
391421
392422 const InstructionSelector *X86Subtarget::getInstructionSelector() const {
393 return InstSelector.get();
423 assert(GISel && "Access to GlobalISel APIs not set");
424 return GISel->getInstructionSelector();
394425 }
395426
396427 const LegalizerInfo *X86Subtarget::getLegalizerInfo() const {
397 return Legalizer.get();
428 assert(GISel && "Access to GlobalISel APIs not set");
429 return GISel->getLegalizerInfo();
398430 }
399431
400432 const RegisterBankInfo *X86Subtarget::getRegBankInfo() const {
401 return RegBankInfo.get();
433 assert(GISel && "Access to GlobalISel APIs not set");
434 return GISel->getRegBankInfo();
402435 }
403436
404437 bool X86Subtarget::enableEarlyIfConversion() const {
1919 #include "X86SelectionDAGInfo.h"
2020 #include "llvm/ADT/StringRef.h"
2121 #include "llvm/ADT/Triple.h"
22 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
23 #include "llvm/CodeGen/GlobalISel/InstructionSelector.h"
24 #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
25 #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
22 #include "llvm/CodeGen/GlobalISel/GISelAccessor.h"
2623 #include "llvm/IR/CallingConv.h"
2724 #include "llvm/MC/MCInstrItineraries.h"
2825 #include "llvm/Target/TargetMachine.h"
316313 /// Instruction itineraries for scheduling
317314 InstrItineraryData InstrItins;
318315
319 /// GlobalISel related APIs.
320 std::unique_ptr CallLoweringInfo;
321 std::unique_ptr Legalizer;
322 std::unique_ptr RegBankInfo;
323 std::unique_ptr InstSelector;
316 /// Gather the accessor points to GlobalISel-related APIs.
317 /// This is used to avoid ifndefs spreading around while GISel is
318 /// an optional library.
319 std::unique_ptr GISel;
324320
325321 private:
326322 /// Override the stack alignment.
348344 ///
349345 X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS,
350346 const X86TargetMachine &TM, unsigned StackAlignOverride);
347
348 /// This object will take onwership of \p GISelAccessor.
349 void setGISelAccessor(GISelAccessor &GISel) { this->GISel.reset(&GISel); }
351350
352351 const X86TargetLowering *getTargetLowering() const override {
353352 return &TLInfo;