blob: 834a1d17114359726babb684fc6b17404a5eb288 [file] [log] [blame]
Alex Bradbury89718422017-10-19 21:37:38 +00001//===-- RISCV.h - Top-level interface for RISCV -----------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Alex Bradbury89718422017-10-19 21:37:38 +00006//
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
Ana Pazos9d6c5532018-10-04 21:50:54 +000017#include "Utils/RISCVBaseInfo.h"
Alex Bradbury21aea512018-09-19 10:54:22 +000018#include "llvm/Target/TargetMachine.h"
Alex Bradbury89718422017-10-19 21:37:38 +000019
20namespace llvm {
21class RISCVTargetMachine;
Alex Bradburyec8aa912017-11-08 13:24:21 +000022class AsmPrinter;
23class FunctionPass;
Alex Bradbury89718422017-10-19 21:37:38 +000024class MCInst;
Alex Bradburyec8aa912017-11-08 13:24:21 +000025class MCOperand;
Alex Bradbury89718422017-10-19 21:37:38 +000026class MachineInstr;
Alex Bradburyec8aa912017-11-08 13:24:21 +000027class MachineOperand;
Sameer AbuAsal9b65ffb2018-06-27 20:51:42 +000028class PassRegistry;
Alex Bradbury89718422017-10-19 21:37:38 +000029
Alex Bradburyec8aa912017-11-08 13:24:21 +000030void LowerRISCVMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
31 const AsmPrinter &AP);
32bool LowerRISCVMachineOperandToMCOperand(const MachineOperand &MO,
33 MCOperand &MCOp, const AsmPrinter &AP);
Alex Bradbury89718422017-10-19 21:37:38 +000034
35FunctionPass *createRISCVISelDag(RISCVTargetMachine &TM);
Sameer AbuAsal9b65ffb2018-06-27 20:51:42 +000036
37FunctionPass *createRISCVMergeBaseOffsetOptPass();
38void initializeRISCVMergeBaseOffsetOptPass(PassRegistry &);
Alex Bradbury21aea512018-09-19 10:54:22 +000039
40FunctionPass *createRISCVExpandPseudoPass();
41void initializeRISCVExpandPseudoPass(PassRegistry &);
Alex Bradbury89718422017-10-19 21:37:38 +000042}
43
44#endif