1 //===-- RISCV.h - Top-level interface for RISC-V ----------------*- 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 contains the entry points for global functions defined in the LLVM 10 // RISC-V back-end. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef LLVM_LIB_TARGET_RISCV_RISCV_H 15 #define LLVM_LIB_TARGET_RISCV_RISCV_H 16 17 #include "MCTargetDesc/RISCVBaseInfo.h" 18 #include "llvm/Target/TargetMachine.h" 19 20 namespace llvm { 21 class FunctionPass; 22 class InstructionSelector; 23 class PassRegistry; 24 class RISCVRegisterBankInfo; 25 class RISCVSubtarget; 26 class RISCVTargetMachine; 27 28 FunctionPass *createRISCVCodeGenPreparePass(); 29 void initializeRISCVCodeGenPreparePass(PassRegistry &); 30 31 FunctionPass *createRISCVDeadRegisterDefinitionsPass(); 32 void initializeRISCVDeadRegisterDefinitionsPass(PassRegistry &); 33 34 FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM, 35 CodeGenOptLevel OptLevel); 36 37 FunctionPass *createRISCVMakeCompressibleOptPass(); 38 void initializeRISCVMakeCompressibleOptPass(PassRegistry &); 39 40 FunctionPass *createRISCVGatherScatterLoweringPass(); 41 void initializeRISCVGatherScatterLoweringPass(PassRegistry &); 42 43 FunctionPass *createRISCVVectorPeepholePass(); 44 void initializeRISCVVectorPeepholePass(PassRegistry &); 45 46 FunctionPass *createRISCVOptWInstrsPass(); 47 void initializeRISCVOptWInstrsPass(PassRegistry &); 48 49 FunctionPass *createRISCVMergeBaseOffsetOptPass(); 50 void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &); 51 52 FunctionPass *createRISCVExpandPseudoPass(); 53 void initializeRISCVExpandPseudoPass(PassRegistry &); 54 55 FunctionPass *createRISCVPreRAExpandPseudoPass(); 56 void initializeRISCVPreRAExpandPseudoPass(PassRegistry &); 57 58 FunctionPass *createRISCVExpandAtomicPseudoPass(); 59 void initializeRISCVExpandAtomicPseudoPass(PassRegistry &); 60 61 FunctionPass *createRISCVInsertVSETVLIPass(); 62 void initializeRISCVInsertVSETVLIPass(PassRegistry &); 63 extern char &RISCVInsertVSETVLIID; 64 65 FunctionPass *createRISCVPostRAExpandPseudoPass(); 66 void initializeRISCVPostRAExpandPseudoPass(PassRegistry &); 67 FunctionPass *createRISCVInsertReadWriteCSRPass(); 68 void initializeRISCVInsertReadWriteCSRPass(PassRegistry &); 69 70 FunctionPass *createRISCVInsertWriteVXRMPass(); 71 void initializeRISCVInsertWriteVXRMPass(PassRegistry &); 72 73 FunctionPass *createRISCVRedundantCopyEliminationPass(); 74 void initializeRISCVRedundantCopyEliminationPass(PassRegistry &); 75 76 FunctionPass *createRISCVMoveMergePass(); 77 void initializeRISCVMoveMergePass(PassRegistry &); 78 79 FunctionPass *createRISCVPushPopOptimizationPass(); 80 void initializeRISCVPushPopOptPass(PassRegistry &); 81 82 InstructionSelector * 83 createRISCVInstructionSelector(const RISCVTargetMachine &, 84 const RISCVSubtarget &, 85 const RISCVRegisterBankInfo &); 86 void initializeRISCVDAGToDAGISelLegacyPass(PassRegistry &); 87 88 FunctionPass *createRISCVPostLegalizerCombiner(); 89 void initializeRISCVPostLegalizerCombinerPass(PassRegistry &); 90 91 FunctionPass *createRISCVO0PreLegalizerCombiner(); 92 void initializeRISCVO0PreLegalizerCombinerPass(PassRegistry &); 93 94 FunctionPass *createRISCVPreLegalizerCombiner(); 95 void initializeRISCVPreLegalizerCombinerPass(PassRegistry &); 96 } // namespace llvm 97 98 #endif 99