xref: /llvm-project/llvm/lib/Target/SPIRV/SPIRV.h (revision eddeb36cf1ced0e14e17ac90f60922366e382100)
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 *createSPIRVStructurizerPass();
24 FunctionPass *createSPIRVMergeRegionExitTargetsPass();
25 FunctionPass *createSPIRVStripConvergenceIntrinsicsPass();
26 FunctionPass *createSPIRVRegularizerPass();
27 FunctionPass *createSPIRVPreLegalizerCombiner();
28 FunctionPass *createSPIRVPreLegalizerPass();
29 FunctionPass *createSPIRVPostLegalizerPass();
30 ModulePass *createSPIRVEmitIntrinsicsPass(SPIRVTargetMachine *TM);
31 MachineFunctionPass *createSPIRVEmitNonSemanticDIPass(SPIRVTargetMachine *TM);
32 InstructionSelector *
33 createSPIRVInstructionSelector(const SPIRVTargetMachine &TM,
34                                const SPIRVSubtarget &Subtarget,
35                                const RegisterBankInfo &RBI);
36 
37 void initializeSPIRVModuleAnalysisPass(PassRegistry &);
38 void initializeSPIRVConvergenceRegionAnalysisWrapperPassPass(PassRegistry &);
39 void initializeSPIRVPreLegalizerPass(PassRegistry &);
40 void initializeSPIRVPreLegalizerCombinerPass(PassRegistry &);
41 void initializeSPIRVPostLegalizerPass(PassRegistry &);
42 void initializeSPIRVStructurizerPass(PassRegistry &);
43 void initializeSPIRVEmitIntrinsicsPass(PassRegistry &);
44 void initializeSPIRVEmitNonSemanticDIPass(PassRegistry &);
45 } // namespace llvm
46 
47 #endif // LLVM_LIB_TARGET_SPIRV_SPIRV_H
48