| 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 | MODULE_PASS("riscv-promote-constant" , RISCVPromoteConstantPass(this)) |
| 22 | #undef MODULE_PASS |
| 23 | |
| 24 | #ifndef FUNCTION_PASS |
| 25 | #define FUNCTION_PASS(NAME, CREATE_PASS) |
| 26 | #endif |
| 27 | FUNCTION_PASS("riscv-codegenprepare" , RISCVCodeGenPreparePass(this)) |
| 28 | FUNCTION_PASS("riscv-gather-scatter-lowering" , |
| 29 | RISCVGatherScatterLoweringPass(this)) |
| 30 | FUNCTION_PASS("riscv-zacas-abi-fix" , RISCVZacasABIFixPass(this)) |
| 31 | #undef FUNCTION_PASS |
| 32 | |
| 33 | #ifndef MACHINE_FUNCTION_PASS |
| 34 | #define MACHINE_FUNCTION_PASS(NAME, CREATE_PASS) |
| 35 | #endif |
| 36 | MACHINE_FUNCTION_PASS("riscv-asm-printer" , RISCVAsmPrinterPass()) |
| 37 | MACHINE_FUNCTION_PASS("riscv-dead-defs" , RISCVDeadRegisterDefinitionsPass()) |
| 38 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-atomics" , |
| 39 | RISCVExpandPseudoAtomicsPass()) |
| 40 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-post-ra" , |
| 41 | RISCVExpandPseudoPostRAPass()) |
| 42 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-emit" , |
| 43 | RISCVExpandPseudoPreEmitPass()) |
| 44 | MACHINE_FUNCTION_PASS("riscv-expand-pseudo-pre-ra" , |
| 45 | RISCVExpandPseudoPreRAPass()) |
| 46 | MACHINE_FUNCTION_PASS("riscv-fold-mem-offset" , RISCVFoldMemOffsetPass()) |
| 47 | MACHINE_FUNCTION_PASS("riscv-indirect-branch-tracking" , |
| 48 | RISCVIndirectBranchTrackingPass()) |
| 49 | MACHINE_FUNCTION_PASS("riscv-insert-read-write-csr" , |
| 50 | RISCVInsertReadWriteCSRPass()) |
| 51 | MACHINE_FUNCTION_PASS("riscv-insert-vsetvli" , RISCVInsertVSETVLIPass()) |
| 52 | MACHINE_FUNCTION_PASS("riscv-insert-write-vxrm" , RISCVInsertWriteVXRMPass()) |
| 53 | MACHINE_FUNCTION_PASS("riscv-isel" , RISCVISelDAGToDAGPass(*this, getOptLevel())) |
| 54 | MACHINE_FUNCTION_PASS("riscv-late-branch-opt" , RISCVLateBranchOptPass()) |
| 55 | MACHINE_FUNCTION_PASS("riscv-load-store-opt" , RISCVLoadStoreOptPass()) |
| 56 | MACHINE_FUNCTION_PASS("riscv-lpad-setup" , RISCVLandingPadSetupPass()) |
| 57 | MACHINE_FUNCTION_PASS("riscv-make-compressible" , RISCVMakeCompressiblePass()) |
| 58 | MACHINE_FUNCTION_PASS("riscv-merge-base-offset" , RISCVMergeBaseOffsetPass()) |
| 59 | MACHINE_FUNCTION_PASS("riscv-move-merge" , RISCVMoveMergePass()) |
| 60 | MACHINE_FUNCTION_PASS("riscv-O0-prelegalizer-combiner" , |
| 61 | RISCVO0PreLegalizerCombinerPass()) |
| 62 | MACHINE_FUNCTION_PASS("riscv-opt-w-instrs" , RISCVOptWInstrsPass()) |
| 63 | MACHINE_FUNCTION_PASS("riscv-post-legalizer-combiner" , |
| 64 | RISCVPostLegalizerCombinerPass()) |
| 65 | MACHINE_FUNCTION_PASS("riscv-pre-legalizer-combiner" , |
| 66 | RISCVPreLegalizerCombinerPass()) |
| 67 | MACHINE_FUNCTION_PASS("riscv-push-pop-opt" , RISCVPushPopOptPass()) |
| 68 | MACHINE_FUNCTION_PASS("riscv-qc-relax-marking" , RISCVQCRelaxMarkingPass()) |
| 69 | MACHINE_FUNCTION_PASS("riscv-redundant-copy-elimination" , |
| 70 | RISCVRedundantCopyEliminationPass()) |
| 71 | MACHINE_FUNCTION_PASS("riscv-vector-peephole" , RISCVVectorPeepholePass()) |
| 72 | MACHINE_FUNCTION_PASS("riscv-vl-optimizer" , RISCVVLOptimizerPass()) |
| 73 | MACHINE_FUNCTION_PASS("riscv-vmv0-elimination" , RISCVVMV0EliminationPass()) |
| 74 | MACHINE_FUNCTION_PASS("riscv-pre-alloc-zilsd-opt" , |
| 75 | RISCVPreAllocZilsdOptPass()) |
| 76 | #undef MACHINE_FUNCTION_PASS |
| 77 | |