xref: /freebsd/contrib/llvm-project/llvm/lib/Target/SPIRV/SPIRV.h (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
1 //===-- SPIRV.h - Top-level interface for SPIR-V representation -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_SPIRV_SPIRV_H
10 #define LLVM_LIB_TARGET_SPIRV_SPIRV_H
11 
12 #include "MCTargetDesc/SPIRVMCTargetDesc.h"
13 #include "llvm/CodeGen/MachineFunctionPass.h"
14 #include "llvm/Target/TargetMachine.h"
15 
16 namespace llvm {
17 class SPIRVTargetMachine;
18 class SPIRVSubtarget;
19 class InstructionSelector;
20 class RegisterBankInfo;
21 
22 ModulePass *createSPIRVPrepareFunctionsPass(const SPIRVTargetMachine &TM);
23 FunctionPass *createSPIRVStripConvergenceIntrinsicsPass();
24 FunctionPass *createSPIRVRegularizerPass();
25 FunctionPass *createSPIRVPreLegalizerPass();
26 FunctionPass *createSPIRVEmitIntrinsicsPass(SPIRVTargetMachine *TM);
27 InstructionSelector *
28 createSPIRVInstructionSelector(const SPIRVTargetMachine &TM,
29                                const SPIRVSubtarget &Subtarget,
30                                const RegisterBankInfo &RBI);
31 
32 void initializeSPIRVModuleAnalysisPass(PassRegistry &);
33 void initializeSPIRVPreLegalizerPass(PassRegistry &);
34 void initializeSPIRVEmitIntrinsicsPass(PassRegistry &);
35 } // namespace llvm
36 
37 #endif // LLVM_LIB_TARGET_SPIRV_SPIRV_H
38