[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / llvm / lib / Target / RISCV / RISCV.h
blob9eb18099894b2177e67282f95c180bb9b3d0915b
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 *createRISCVPostRAExpandPseudoPass();
65 void initializeRISCVPostRAExpandPseudoPass(PassRegistry &);
66 FunctionPass *createRISCVInsertReadWriteCSRPass();
67 void initializeRISCVInsertReadWriteCSRPass(PassRegistry &);
69 FunctionPass *createRISCVInsertWriteVXRMPass();
70 void initializeRISCVInsertWriteVXRMPass(PassRegistry &);
72 FunctionPass *createRISCVRedundantCopyEliminationPass();
73 void initializeRISCVRedundantCopyEliminationPass(PassRegistry &);
75 FunctionPass *createRISCVInitUndefPass();
76 void initializeRISCVInitUndefPass(PassRegistry &);
77 extern char &RISCVInitUndefID;
79 FunctionPass *createRISCVMoveMergePass();
80 void initializeRISCVMoveMergePass(PassRegistry &);
82 FunctionPass *createRISCVPushPopOptimizationPass();
83 void initializeRISCVPushPopOptPass(PassRegistry &);
85 InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &,
86 RISCVSubtarget &,
87 RISCVRegisterBankInfo &);
88 void initializeRISCVDAGToDAGISelPass(PassRegistry &);
90 FunctionPass *createRISCVPostLegalizerCombiner();
91 void initializeRISCVPostLegalizerCombinerPass(PassRegistry &);
93 FunctionPass *createRISCVO0PreLegalizerCombiner();
94 void initializeRISCVO0PreLegalizerCombinerPass(PassRegistry &);
96 FunctionPass *createRISCVPreLegalizerCombiner();
97 void initializeRISCVPreLegalizerCombinerPass(PassRegistry &);
98 } // namespace llvm
100 #endif