1 //===-- RISCV.h - Top-level interface for RISCV -----------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file contains the entry points for global functions defined in the LLVM
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_RISCV_RISCV_H
15 #define LLVM_LIB_TARGET_RISCV_RISCV_H
17 #include "Utils/RISCVBaseInfo.h"
18 #include "llvm/Target/TargetMachine.h"
21 class RISCVRegisterBankInfo
;
23 class RISCVTargetMachine
;
26 class InstructionSelector
;
33 void LowerRISCVMachineInstrToMCInst(const MachineInstr
*MI
, MCInst
&OutMI
,
34 const AsmPrinter
&AP
);
35 bool LowerRISCVMachineOperandToMCOperand(const MachineOperand
&MO
,
36 MCOperand
&MCOp
, const AsmPrinter
&AP
);
38 FunctionPass
*createRISCVISelDag(RISCVTargetMachine
&TM
);
40 FunctionPass
*createRISCVMergeBaseOffsetOptPass();
41 void initializeRISCVMergeBaseOffsetOptPass(PassRegistry
&);
43 FunctionPass
*createRISCVExpandPseudoPass();
44 void initializeRISCVExpandPseudoPass(PassRegistry
&);
46 InstructionSelector
*createRISCVInstructionSelector(const RISCVTargetMachine
&,
48 RISCVRegisterBankInfo
&);