| 1 | //===- DirectXPassRegistry.def - Registry of DirectX 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 | // DirectX backend. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | // NOTE: NO INCLUDE GUARD DESIRED! |
| 15 | |
| 16 | #ifndef MODULE_ANALYSIS |
| 17 | #define MODULE_ANALYSIS(NAME, CREATE_PASS) |
| 18 | #endif |
| 19 | MODULE_ANALYSIS("dx-shader-flags" , dxil::ShaderFlagsAnalysis()) |
| 20 | MODULE_ANALYSIS("dxil-root-signature-analysis" , dxil::RootSignatureAnalysis()) |
| 21 | #undef MODULE_ANALYSIS |
| 22 | |
| 23 | #ifndef MODULE_PASS |
| 24 | #define MODULE_PASS(NAME, CREATE_PASS) |
| 25 | #endif |
| 26 | MODULE_PASS("dxil-cbuffer-access" , DXILCBufferAccess()) |
| 27 | MODULE_PASS("dxil-finalize-linkage" , DXILFinalizeLinkage()) |
| 28 | MODULE_PASS("dxil-data-scalarization" , DXILDataScalarization()) |
| 29 | MODULE_PASS("dxil-flatten-arrays" , DXILFlattenArrays()) |
| 30 | MODULE_PASS("dxil-debug-info" , dxil::DXILDebugInfo()) |
| 31 | MODULE_PASS("dxil-intrinsic-expansion" , DXILIntrinsicExpansion()) |
| 32 | MODULE_PASS("dxil-mem-intrinsics" , DXILMemIntrinsics()) |
| 33 | MODULE_PASS("dxil-op-lower" , DXILOpLowering()) |
| 34 | MODULE_PASS("dxil-pretty-printer" , DXILPrettyPrinterPass(dbgs())) |
| 35 | MODULE_PASS("dxil-translate-metadata" , DXILTranslateMetadata()) |
| 36 | MODULE_PASS("dxil-resource-implicit-binding" , DXILResourceImplicitBinding()) |
| 37 | MODULE_PASS("dxil-post-optimization-validation" , DXILPostOptimizationValidation()) |
| 38 | // TODO: rename to print<foo> after NPM switch |
| 39 | MODULE_PASS("print-dx-shader-flags" , dxil::ShaderFlagsAnalysisPrinter(dbgs())) |
| 40 | MODULE_PASS("print<dxil-root-signature>" , dxil::RootSignatureAnalysisPrinter(dbgs())) |
| 41 | #undef MODULE_PASS |
| 42 | |
| 43 | #ifndef FUNCTION_PASS |
| 44 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
| 45 | #endif |
| 46 | FUNCTION_PASS("dxil-forward-handle-accesses" , DXILForwardHandleAccesses()) |
| 47 | FUNCTION_PASS("dxil-remove-unused-resources" , DXILRemoveUnusedResources()) |
| 48 | FUNCTION_PASS("dxil-resource-access" , DXILResourceAccess()) |
| 49 | FUNCTION_PASS("dxil-legalize" , DXILLegalizePass()) |
| 50 | #undef FUNCTION_PASS |
| 51 | |