[SampleProfileLoader] Fix integer overflow in generateMDProfMetadata (#90217)
[llvm-project.git] / llvm / lib / Target / RISCV / RISCV.h
blobd405395dcf9ec4146db78ee6fc6bb19fd9ff0ae7
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.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_RISCV_RISCV_H
15 #define LLVM_LIB_TARGET_RISCV_RISCV_H
17 #include "MCTargetDesc/RISCVBaseInfo.h"
18 #include "llvm/Target/TargetMachine.h"
20 namespace llvm {
21 class FunctionPass;
22 class InstructionSelector;
23 class PassRegistry;
24 class RISCVRegisterBankInfo;
25 class RISCVSubtarget;
26 class RISCVTargetMachine;
28 FunctionPass *createRISCVCodeGenPreparePass();
29 void initializeRISCVCodeGenPreparePass(PassRegistry &);
31 FunctionPass *createRISCVDeadRegisterDefinitionsPass();
32 void initializeRISCVDeadRegisterDefinitionsPass(PassRegistry &);
34 FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM,
35 CodeGenOptLevel OptLevel);
37 FunctionPass *createRISCVMakeCompressibleOptPass();
38 void initializeRISCVMakeCompressibleOptPass(PassRegistry &);
40 FunctionPass *createRISCVGatherScatterLoweringPass();
41 void initializeRISCVGatherScatterLoweringPass(PassRegistry &);
43 FunctionPass *createRISCVFoldMasksPass();
44 void initializeRISCVFoldMasksPass(PassRegistry &);
46 FunctionPass *createRISCVOptWInstrsPass();
47 void initializeRISCVOptWInstrsPass(PassRegistry &);
49 FunctionPass *createRISCVMergeBaseOffsetOptPass();
50 void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &);
52 FunctionPass *createRISCVExpandPseudoPass();
53 void initializeRISCVExpandPseudoPass(PassRegistry &);
55 FunctionPass *createRISCVPreRAExpandPseudoPass();
56 void initializeRISCVPreRAExpandPseudoPass(PassRegistry &);
58 FunctionPass *createRISCVExpandAtomicPseudoPass();
59 void initializeRISCVExpandAtomicPseudoPass(PassRegistry &);
61 FunctionPass *createRISCVInsertVSETVLIPass();
62 void initializeRISCVInsertVSETVLIPass(PassRegistry &);
64 FunctionPass *createRISCVCoalesceVSETVLIPass();
65 void initializeRISCVCoalesceVSETVLIPass(PassRegistry &);
67 FunctionPass *createRISCVPostRAExpandPseudoPass();
68 void initializeRISCVPostRAExpandPseudoPass(PassRegistry &);
69 FunctionPass *createRISCVInsertReadWriteCSRPass();
70 void initializeRISCVInsertReadWriteCSRPass(PassRegistry &);
72 FunctionPass *createRISCVInsertWriteVXRMPass();
73 void initializeRISCVInsertWriteVXRMPass(PassRegistry &);
75 FunctionPass *createRISCVRedundantCopyEliminationPass();
76 void initializeRISCVRedundantCopyEliminationPass(PassRegistry &);
78 FunctionPass *createRISCVMoveMergePass();
79 void initializeRISCVMoveMergePass(PassRegistry &);
81 FunctionPass *createRISCVPushPopOptimizationPass();
82 void initializeRISCVPushPopOptPass(PassRegistry &);
84 InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &,
85 RISCVSubtarget &,
86 RISCVRegisterBankInfo &);
87 void initializeRISCVDAGToDAGISelPass(PassRegistry &);
89 FunctionPass *createRISCVPostLegalizerCombiner();
90 void initializeRISCVPostLegalizerCombinerPass(PassRegistry &);
92 FunctionPass *createRISCVO0PreLegalizerCombiner();
93 void initializeRISCVO0PreLegalizerCombinerPass(PassRegistry &);
95 FunctionPass *createRISCVPreLegalizerCombiner();
96 void initializeRISCVPreLegalizerCombinerPass(PassRegistry &);
97 } // namespace llvm
99 #endif