RISCV.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //===-- RISCV.h - Top-level interface for RISCV -----------------*- 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. #ifndef LLVM_LIB_TARGET_RISCV_RISCV_H
  14. #define LLVM_LIB_TARGET_RISCV_RISCV_H
  15. #include "MCTargetDesc/RISCVBaseInfo.h"
  16. #include "llvm/Target/TargetMachine.h"
  17. namespace llvm {
  18. class AsmPrinter;
  19. class FunctionPass;
  20. class InstructionSelector;
  21. class MCInst;
  22. class MCOperand;
  23. class MachineInstr;
  24. class MachineOperand;
  25. class PassRegistry;
  26. class RISCVRegisterBankInfo;
  27. class RISCVSubtarget;
  28. class RISCVTargetMachine;
  29. FunctionPass *createRISCVCodeGenPreparePass();
  30. void initializeRISCVCodeGenPreparePass(PassRegistry &);
  31. bool lowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
  32. AsmPrinter &AP);
  33. bool lowerRISCVMachineOperandToMCOperand(const MachineOperand &MO,
  34. MCOperand &MCOp, const AsmPrinter &AP);
  35. FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM,
  36. CodeGenOpt::Level OptLevel);
  37. FunctionPass *createRISCVMakeCompressibleOptPass();
  38. void initializeRISCVMakeCompressibleOptPass(PassRegistry &);
  39. FunctionPass *createRISCVGatherScatterLoweringPass();
  40. void initializeRISCVGatherScatterLoweringPass(PassRegistry &);
  41. FunctionPass *createRISCVSExtWRemovalPass();
  42. void initializeRISCVSExtWRemovalPass(PassRegistry &);
  43. FunctionPass *createRISCVStripWSuffixPass();
  44. void initializeRISCVStripWSuffixPass(PassRegistry &);
  45. FunctionPass *createRISCVMergeBaseOffsetOptPass();
  46. void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &);
  47. FunctionPass *createRISCVExpandPseudoPass();
  48. void initializeRISCVExpandPseudoPass(PassRegistry &);
  49. FunctionPass *createRISCVPreRAExpandPseudoPass();
  50. void initializeRISCVPreRAExpandPseudoPass(PassRegistry &);
  51. FunctionPass *createRISCVExpandAtomicPseudoPass();
  52. void initializeRISCVExpandAtomicPseudoPass(PassRegistry &);
  53. FunctionPass *createRISCVInsertVSETVLIPass();
  54. void initializeRISCVInsertVSETVLIPass(PassRegistry &);
  55. FunctionPass *createRISCVRedundantCopyEliminationPass();
  56. void initializeRISCVRedundantCopyEliminationPass(PassRegistry &);
  57. InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &,
  58. RISCVSubtarget &,
  59. RISCVRegisterBankInfo &);
  60. void initializeRISCVDAGToDAGISelPass(PassRegistry &);
  61. } // namespace llvm
  62. #endif