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 14#ifndef LLVM_LIB_TARGET_RISCV_RISCV_H 15#define LLVM_LIB_TARGET_RISCV_RISCV_H 16 17#include "Utils/RISCVBaseInfo.h" 18#include "llvm/Target/TargetMachine.h" 19 20namespace llvm { 21class RISCVRegisterBankInfo; 22class RISCVSubtarget; 23class RISCVTargetMachine; 24class AsmPrinter; 25class FunctionPass; 26class InstructionSelector; 27class MCInst; 28class MCOperand; 29class MachineInstr; 30class MachineOperand; 31class PassRegistry; 32 33void LowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, 34 const AsmPrinter &AP); 35bool LowerRISCVMachineOperandToMCOperand(const MachineOperand &MO, 36 MCOperand &MCOp, const AsmPrinter &AP); 37 38FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM); 39 40FunctionPass *createRISCVMergeBaseOffsetOptPass(); 41void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &); 42 43FunctionPass *createRISCVExpandPseudoPass(); 44void initializeRISCVExpandPseudoPass(PassRegistry &); 45 46InstructionSelector *createRISCVInstructionSelector(const RISCVTargetMachine &, 47 RISCVSubtarget &, 48 RISCVRegisterBankInfo &); 49} 50 51#endif 52