1//===- RISCVPassRegistry.def - Registry of RISC-V 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 RISC-V
10// backend.
11//
12//===----------------------------------------------------------------------===//
13
14// NOTE: NO INCLUDE GUARD DESIRED!
15
16#ifndef MODULE_PASS
17#define MODULE_PASS(NAME, CREATE_PASS)
18#endif
19MODULE_PASS("riscv-asm-printer-begin", RISCVAsmPrinterBeginPass())
20MODULE_PASS("riscv-asm-printer-end", RISCVAsmPrinterEndPass())
21#undef MODULE_PASS
22
23#ifndef FUNCTION_PASS
24#define FUNCTION_PASS(NAME, CREATE_PASS)
25#endif
26FUNCTION_PASS("riscv-codegenprepare", RISCVCodeGenPreparePass(this))
27FUNCTION_PASS("riscv-gather-scatter-lowering",
28 RISCVGatherScatterLoweringPass(this))
29FUNCTION_PASS("riscv-zacas-abi-fix", RISCVZacasABIFixPass(this))
30#undef FUNCTION_PASS
31
32#ifndef MACHINE_FUNCTION_PASS
33#define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS)
34#endif
35MACHINE_FUNCTION_PASS("riscv-asm-printer", RISCVAsmPrinterPass())
36MACHINE_FUNCTION_PASS("riscv-expand-pseudo-atomics",
37 RISCVExpandPseudoAtomicsPass())
38MACHINE_FUNCTION_PASS("riscv-expand-pseudo-post-ra",
39 RISCVExpandPseudoPostRAPass())
40MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-emit",
41 RISCVExpandPseudoPreEmitPass())
42MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-ra",
43 RISCVExpandPseudoPreRAPass())
44MACHINE_FUNCTION_PASS("riscv-fold-mem-offset", RISCVFoldMemOffsetPass())
45MACHINE_FUNCTION_PASS("riscv-isel", RISCVISelDAGToDAGPass(*this, getOptLevel()))
46MACHINE_FUNCTION_PASS("riscv-opt-w-instrs", RISCVOptWInstrsPass())
47MACHINE_FUNCTION_PASS("riscv-vector-peephole", RISCVVectorPeepholePass())
48MACHINE_FUNCTION_PASS("riscv-vl-optimizer", RISCVVLOptimizerPass())
49#undef MACHINE_FUNCTION_PASS
50