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 RegisterBankInfo; 21 22 /// The goal of this helper class is to gather the accessor to all 23 /// the APIs related to GlobalISel. 24 /// It should be derived to feature an actual accessor to the GISel APIs. 25 /// The reason why this is not simply done into the subtarget is to avoid 26 /// spreading ifdefs around. 27 struct GISelAccessor { ~GISelAccessorGISelAccessor28 virtual ~GISelAccessor() {} getCallLoweringGISelAccessor29 virtual const CallLowering *getCallLowering() const { return nullptr;} getRegBankInfoGISelAccessor30 virtual const RegisterBankInfo *getRegBankInfo() const { return nullptr;} 31 }; 32 } // End namespace llvm; 33 #endif 34