1 //===- AMDGPUPassRegistry.def
- Registry of AMDGPU passes
-------*- C
++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file is used as the registry of passes that are part of the
12 //===----------------------------------------------------------------------===//
14 // NOTE
: NO INCLUDE GUARD DESIRED
!
17 #define
MODULE_PASS(NAME
, CREATE_PASS
)
19 MODULE_PASS("amdgpu-always-inline", AMDGPUAlwaysInlinePass())
20 MODULE_PASS("amdgpu-attributor", AMDGPUAttributorPass(*this))
21 MODULE_PASS("amdgpu-lower-buffer-fat-pointers",
22 AMDGPULowerBufferFatPointersPass(*this))
23 MODULE_PASS("amdgpu-lower-ctor-dtor", AMDGPUCtorDtorLoweringPass())
24 MODULE_PASS("amdgpu-lower-module-lds", AMDGPULowerModuleLDSPass(*this))
25 MODULE_PASS("amdgpu-printf-runtime-binding", AMDGPUPrintfRuntimeBindingPass())
26 MODULE_PASS("amdgpu-unify-metadata", AMDGPUUnifyMetadataPass())
30 #define FUNCTION_PASS(NAME, CREATE_PASS)
32 FUNCTION_PASS("amdgpu-codegenprepare", AMDGPUCodeGenPreparePass(*this))
33 FUNCTION_PASS("amdgpu-image-intrinsic-opt",
34 AMDGPUImageIntrinsicOptimizerPass(*this))
35 FUNCTION_PASS("amdgpu-lower-kernel-arguments",
36 AMDGPULowerKernelArgumentsPass(*this))
37 FUNCTION_PASS("amdgpu-lower-kernel-attributes",
38 AMDGPULowerKernelAttributesPass())
39 FUNCTION_PASS("amdgpu-simplifylib", AMDGPUSimplifyLibCallsPass())
40 FUNCTION_PASS("amdgpu-promote-alloca", AMDGPUPromoteAllocaPass(*this))
41 FUNCTION_PASS("amdgpu-promote-alloca-to-vector",
42 AMDGPUPromoteAllocaToVectorPass(*this))
43 FUNCTION_PASS("amdgpu-promote-kernel-arguments",
44 AMDGPUPromoteKernelArgumentsPass())
45 FUNCTION_PASS("amdgpu-rewrite-undef-for-phi", AMDGPURewriteUndefForPHIPass())
46 FUNCTION_PASS("amdgpu-unify-divergent-exit-nodes",
47 AMDGPUUnifyDivergentExitNodesPass())
48 FUNCTION_PASS("amdgpu-usenative", AMDGPUUseNativeCallsPass())
51 #ifndef FUNCTION_ANALYSIS
52 #define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
55 #ifndef FUNCTION_ALIAS_ANALYSIS
56 #define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
57 FUNCTION_ANALYSIS(NAME, CREATE_PASS)
59 FUNCTION_ALIAS_ANALYSIS("amdgpu-aa", AMDGPUAA())
60 #undef FUNCTION_ALIAS_ANALYSIS
61 #undef FUNCTION_ANALYSIS
63 #ifndef FUNCTION_PASS_WITH_PARAMS
64 #define FUNCTION_PASS_WITH_PARAMS(NAME, CLASS, CREATE_PASS, PARSER, PARAMS)
66 FUNCTION_PASS_WITH_PARAMS(
67 "amdgpu-atomic-optimizer",
68 "AMDGPUAtomicOptimizerPass",
69 [=](ScanOptions Strategy) {
70 return AMDGPUAtomicOptimizerPass(*this, Strategy);
72 parseAMDGPUAtomicOptimizerStrategy, "strategy=dpp|iterative|none")
73 #undef FUNCTION_PASS_WITH_PARAMS
75 #ifndef MACHINE_FUNCTION_PASS
76 #define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS)
78 MACHINE_FUNCTION_PASS("amdgpu-isel", AMDGPUISelDAGToDAGPass(*this))
79 #undef MACHINE_FUNCTION_PASS