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 AsmPrinter; 22 class FunctionPass; 23 class InstructionSelector; 24 class MCInst; 25 class MCOperand; 26 class MachineInstr; 27 class MachineOperand; 28 class PassRegistry; 29 class RISCVRegisterBankInfo; 30 class RISCVSubtarget; 31 class RISCVTargetMachine; 32 33 FunctionPass *createRISCVCodeGenPreparePass(); 34 void initializeRISCVCodeGenPreparePass(PassRegistry &); 35 36 FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM, 37 CodeGenOpt::Level OptLevel); 38 39 FunctionPass *createRISCVMakeCompressibleOptPass(); 40 void initializeRISCVMakeCompressibleOptPass(PassRegistry &); 41 42 FunctionPass *createRISCVGatherScatterLoweringPass(); 43 void initializeRISCVGatherScatterLoweringPass(PassRegistry &); 44 45 FunctionPass *createRISCVOptWInstrsPass(); 46 void initializeRISCVOptWInstrsPass(PassRegistry &); 47 48 FunctionPass *createRISCVMergeBaseOffsetOptPass(); 49 void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &); 50 51 FunctionPass *createRISCVExpandPseudoPass(); 52 void initializeRISCVExpandPseudoPass(PassRegistry &); 53 54 FunctionPass *createRISCVPreRAExpandPseudoPass(); 55 void initializeRISCVPreRAExpandPseudoPass(PassRegistry &); 56 57 FunctionPass *createRISCVExpandAtomicPseudoPass(); 58 void initializeRISCVExpandAtomicPseudoPass(PassRegistry &); 59 60 FunctionPass *createRISCVInsertVSETVLIPass(); 61 void initializeRISCVInsertVSETVLIPass(PassRegistry &); 62 63 FunctionPass *createRISCVInsertReadWriteCSRPass(); 64 void initializeRISCVInsertReadWriteCSRPass(PassRegistry &); 65 66 FunctionPass *createRISCVRedundantCopyEliminationPass(); 67 void initializeRISCVRedundantCopyEliminationPass(PassRegistry &); 68 69 FunctionPass *createRISCVInitUndefPass(); 70 void initializeRISCVInitUndefPass(PassRegistry &); 71 extern char &RISCVInitUndefID; 72 73 FunctionPass *createRISCVMoveMergePass(); 74 void initializeRISCVMoveMergePass(PassRegistry &); 75 76 FunctionPass *createRISCVPushPopOptimizationPass(); 77 void initializeRISCVPushPopOptPass(PassRegistry &); 78 79 InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &, 80 RISCVSubtarget &, 81 RISCVRegisterBankInfo &); 82 void initializeRISCVDAGToDAGISelPass(PassRegistry &); 83 } // namespace llvm 84 85 #endif 86