LLVM  4.0.0
GISelAccessor.h
Go to the documentation of this file.
1 //===-- GISelAccessor.h - GISel Accessor ------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 /// This file declares the API to access the various APIs related
11 /// to GlobalISel.
12 //
13 //===----------------------------------------------------------------------===/
14 
15 #ifndef LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H
16 #define LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H
17 
18 namespace llvm {
19 class CallLowering;
20 class InstructionSelector;
21 class LegalizerInfo;
22 class RegisterBankInfo;
23 
24 /// The goal of this helper class is to gather the accessor to all
25 /// the APIs related to GlobalISel.
26 /// It should be derived to feature an actual accessor to the GISel APIs.
27 /// The reason why this is not simply done into the subtarget is to avoid
28 /// spreading ifdefs around.
29 struct GISelAccessor {
30  virtual ~GISelAccessor() {}
31  virtual const CallLowering *getCallLowering() const { return nullptr;}
33  return nullptr;
34  }
35  virtual const LegalizerInfo *getLegalizerInfo() const { return nullptr; }
36  virtual const RegisterBankInfo *getRegBankInfo() const { return nullptr;}
37 };
38 } // End namespace llvm;
39 #endif
The goal of this helper class is to gather the accessor to all the APIs related to GlobalISel...
Definition: GISelAccessor.h:29
virtual const InstructionSelector * getInstructionSelector() const
Definition: GISelAccessor.h:32
Holds all the information related to register banks.
virtual const RegisterBankInfo * getRegBankInfo() const
Definition: GISelAccessor.h:36
virtual const CallLowering * getCallLowering() const
Definition: GISelAccessor.h:31
virtual ~GISelAccessor()
Definition: GISelAccessor.h:30
RegisterBankInfo(RegisterBank **RegBanks, unsigned NumRegBanks)
Create a RegisterBankInfo that can accomodate up to NumRegBanks RegisterBank instances.
Provides the logic to select generic machine instructions.
virtual const LegalizerInfo * getLegalizerInfo() const
Definition: GISelAccessor.h:35