| 1 | //===- SPIRVPassRegistry.def - Registry of SPIRV passes -----*- 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 | // This file is used as the registry of passes that are part of the |
| 10 | // SPIRV backend. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | // NOTE: NO INCLUDE GUARD DESIRED! |
| 15 | |
| 16 | #ifndef MODULE_PASS |
| 17 | #define MODULE_PASS(NAME, CREATE_PASS) |
| 18 | #endif |
| 19 | MODULE_PASS("spirv-cbuffer-access" , SPIRVCBufferAccess()) |
| 20 | MODULE_PASS("spirv-legalize-implicit-binding" , SPIRVLegalizeImplicitBinding()) |
| 21 | MODULE_PASS("spirv-legalize-zero-size-arrays" , SPIRVLegalizeZeroSizeArrays(*static_cast<const SPIRVTargetMachine *>(this))) |
| 22 | MODULE_PASS("spirv-lower-ctor-dtor" , SPIRVCtorDtorLoweringPass()) |
| 23 | MODULE_PASS("spirv-prepare-functions" , SPIRVPrepareFunctions(*static_cast<const SPIRVTargetMachine *>(this))) |
| 24 | MODULE_PASS("spirv-prepare-globals" , SPIRVPrepareGlobals()) |
| 25 | MODULE_PASS("spirv-pushconstant-access" , SPIRVPushConstantAccess(*static_cast<const SPIRVTargetMachine *>(this))) |
| 26 | MODULE_PASS("spirv-emit-intrinsics" , SPIRVEmitIntrinsicsPass(*static_cast<const SPIRVTargetMachine *>(this))) |
| 27 | #undef MODULE_PASS |
| 28 | |
| 29 | #ifndef FUNCTION_PASS |
| 30 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
| 31 | #endif |
| 32 | FUNCTION_PASS("spirv-legalize-pointer-cast" , SPIRVLegalizePointerCast(*static_cast<const SPIRVTargetMachine *>(this))) |
| 33 | FUNCTION_PASS("spirv-merge-region-exits" , SPIRVMergeRegionExitTargets()) |
| 34 | FUNCTION_PASS("spirv-regularizer" , SPIRVRegularizer()) |
| 35 | FUNCTION_PASS("spirv-structurizer" , SPIRVStructurizerWrapper()) |
| 36 | #undef FUNCTION_PASS |
| 37 | |
| 38 | #ifndef FUNCTION_ANALYSIS |
| 39 | #define FUNCTION_ANALYSIS(NAME, CREATE_PASS) |
| 40 | #endif |
| 41 | FUNCTION_ANALYSIS("spirv-convergence-region" , SPIRVConvergenceRegionAnalysis()) |
| 42 | #undef FUNCTION_ANALYSIS |
| 43 | |