xref: /freebsd/contrib/llvm-project/llvm/lib/Target/RISCV/RISCV.h (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1*06c3fb27SDimitry Andric //===-- RISCV.h - Top-level interface for RISC-V ----------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This file contains the entry points for global functions defined in the LLVM
100b57cec5SDimitry Andric // RISC-V back-end.
110b57cec5SDimitry Andric //
120b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
130b57cec5SDimitry Andric 
140b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_RISCV_RISCV_H
150b57cec5SDimitry Andric #define LLVM_LIB_TARGET_RISCV_RISCV_H
160b57cec5SDimitry Andric 
17e8d8bef9SDimitry Andric #include "MCTargetDesc/RISCVBaseInfo.h"
180b57cec5SDimitry Andric #include "llvm/Target/TargetMachine.h"
190b57cec5SDimitry Andric 
200b57cec5SDimitry Andric namespace llvm {
210b57cec5SDimitry Andric class AsmPrinter;
220b57cec5SDimitry Andric class FunctionPass;
238bcb0991SDimitry Andric class InstructionSelector;
240b57cec5SDimitry Andric class MCInst;
250b57cec5SDimitry Andric class MCOperand;
260b57cec5SDimitry Andric class MachineInstr;
270b57cec5SDimitry Andric class MachineOperand;
280b57cec5SDimitry Andric class PassRegistry;
29bdd1243dSDimitry Andric class RISCVRegisterBankInfo;
30bdd1243dSDimitry Andric class RISCVSubtarget;
31bdd1243dSDimitry Andric class RISCVTargetMachine;
320b57cec5SDimitry Andric 
33fcaf7f86SDimitry Andric FunctionPass *createRISCVCodeGenPreparePass();
34fcaf7f86SDimitry Andric void initializeRISCVCodeGenPreparePass(PassRegistry &);
35fcaf7f86SDimitry Andric 
3681ad6265SDimitry Andric FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM,
3781ad6265SDimitry Andric                                  CodeGenOpt::Level OptLevel);
3881ad6265SDimitry Andric 
3981ad6265SDimitry Andric FunctionPass *createRISCVMakeCompressibleOptPass();
4081ad6265SDimitry Andric void initializeRISCVMakeCompressibleOptPass(PassRegistry &);
410b57cec5SDimitry Andric 
42349cc55cSDimitry Andric FunctionPass *createRISCVGatherScatterLoweringPass();
43349cc55cSDimitry Andric void initializeRISCVGatherScatterLoweringPass(PassRegistry &);
44349cc55cSDimitry Andric 
45*06c3fb27SDimitry Andric FunctionPass *createRISCVOptWInstrsPass();
46*06c3fb27SDimitry Andric void initializeRISCVOptWInstrsPass(PassRegistry &);
47bdd1243dSDimitry Andric 
480b57cec5SDimitry Andric FunctionPass *createRISCVMergeBaseOffsetOptPass();
490b57cec5SDimitry Andric void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &);
500b57cec5SDimitry Andric 
510b57cec5SDimitry Andric FunctionPass *createRISCVExpandPseudoPass();
520b57cec5SDimitry Andric void initializeRISCVExpandPseudoPass(PassRegistry &);
538bcb0991SDimitry Andric 
54bdd1243dSDimitry Andric FunctionPass *createRISCVPreRAExpandPseudoPass();
55bdd1243dSDimitry Andric void initializeRISCVPreRAExpandPseudoPass(PassRegistry &);
56bdd1243dSDimitry Andric 
575ffd83dbSDimitry Andric FunctionPass *createRISCVExpandAtomicPseudoPass();
585ffd83dbSDimitry Andric void initializeRISCVExpandAtomicPseudoPass(PassRegistry &);
595ffd83dbSDimitry Andric 
60fe6060f1SDimitry Andric FunctionPass *createRISCVInsertVSETVLIPass();
61fe6060f1SDimitry Andric void initializeRISCVInsertVSETVLIPass(PassRegistry &);
62e8d8bef9SDimitry Andric 
63*06c3fb27SDimitry Andric FunctionPass *createRISCVInsertReadWriteCSRPass();
64*06c3fb27SDimitry Andric void initializeRISCVInsertReadWriteCSRPass(PassRegistry &);
65*06c3fb27SDimitry Andric 
6681ad6265SDimitry Andric FunctionPass *createRISCVRedundantCopyEliminationPass();
6781ad6265SDimitry Andric void initializeRISCVRedundantCopyEliminationPass(PassRegistry &);
6881ad6265SDimitry Andric 
69*06c3fb27SDimitry Andric FunctionPass *createRISCVInitUndefPass();
70*06c3fb27SDimitry Andric void initializeRISCVInitUndefPass(PassRegistry &);
71*06c3fb27SDimitry Andric extern char &RISCVInitUndefID;
72*06c3fb27SDimitry Andric 
73*06c3fb27SDimitry Andric FunctionPass *createRISCVMoveMergePass();
74*06c3fb27SDimitry Andric void initializeRISCVMoveMergePass(PassRegistry &);
75*06c3fb27SDimitry Andric 
76*06c3fb27SDimitry Andric FunctionPass *createRISCVPushPopOptimizationPass();
77*06c3fb27SDimitry Andric void initializeRISCVPushPopOptPass(PassRegistry &);
78*06c3fb27SDimitry Andric 
798bcb0991SDimitry Andric InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &,
808bcb0991SDimitry Andric                                                     RISCVSubtarget &,
818bcb0991SDimitry Andric                                                     RISCVRegisterBankInfo &);
82bdd1243dSDimitry Andric void initializeRISCVDAGToDAGISelPass(PassRegistry &);
83bdd1243dSDimitry Andric } // namespace llvm
840b57cec5SDimitry Andric 
850b57cec5SDimitry Andric #endif
86