| 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 |
| 19 | MODULE_PASS("riscv-asm-printer-begin" , RISCVAsmPrinterBeginPass()) |
| 20 | MODULE_PASS("riscv-asm-printer-end" , RISCVAsmPrinterEndPass()) |
| 21 | #undef MODULE_PASS |
| 22 | |
| 23 | #ifndef FUNCTION_PASS |
| 24 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
| 25 | #endif |
| 26 | FUNCTION_PASS("riscv-codegenprepare" , RISCVCodeGenPreparePass(this)) |
| 27 | FUNCTION_PASS("riscv-gather-scatter-lowering" , |
| 28 | RISCVGatherScatterLoweringPass(this)) |
| 29 | FUNCTION_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 |
| 35 | MACHINE_FUNCTION_PASS("riscv-asm-printer" , RISCVAsmPrinterPass()) |
| 36 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-atomics" , |
| 37 | RISCVExpandPseudoAtomicsPass()) |
| 38 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-post-ra" , |
| 39 | RISCVExpandPseudoPostRAPass()) |
| 40 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-emit" , |
| 41 | RISCVExpandPseudoPreEmitPass()) |
| 42 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-ra" , |
| 43 | RISCVExpandPseudoPreRAPass()) |
| 44 | MACHINE_FUNCTION_PASS("riscv-fold-mem-offset" , RISCVFoldMemOffsetPass()) |
| 45 | MACHINE_FUNCTION_PASS("riscv-isel" , RISCVISelDAGToDAGPass(*this, getOptLevel())) |
| 46 | MACHINE_FUNCTION_PASS("riscv-opt-w-instrs" , RISCVOptWInstrsPass()) |
| 47 | MACHINE_FUNCTION_PASS("riscv-vector-peephole" , RISCVVectorPeepholePass()) |
| 48 | MACHINE_FUNCTION_PASS("riscv-vl-optimizer" , RISCVVLOptimizerPass()) |
| 49 | #undef MACHINE_FUNCTION_PASS |
| 50 | |