1//===-- LoongArch.h - Top-level interface for LoongArch ---------*- 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// LoongArch back-end.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
15#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
16
17#include "MCTargetDesc/LoongArchBaseInfo.h"
18#include "llvm/Target/TargetMachine.h"
19
20namespace llvm {
21class AsmPrinter;
22class FunctionPass;
23class LoongArchTargetMachine;
24class MCInst;
25class MCOperand;
26class MachineInstr;
27class MachineOperand;
28class PassRegistry;
29
30bool lowerLoongArchMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
31 AsmPrinter &AP);
32bool lowerLoongArchMachineOperandToMCOperand(const MachineOperand &MO,
33 MCOperand &MCOp,
34 const AsmPrinter &AP);
35
36FunctionPass *createLoongArchDeadRegisterDefinitionsPass();
37FunctionPass *createLoongArchExpandAtomicPseudoPass();
38FunctionPass *createLoongArchISelDag(LoongArchTargetMachine &TM);
39FunctionPass *createLoongArchOptWInstrsPass();
40FunctionPass *createLoongArchPreRAExpandPseudoPass();
41FunctionPass *createLoongArchExpandPseudoPass();
42void initializeLoongArchDAGToDAGISelLegacyPass(PassRegistry &);
43void initializeLoongArchDeadRegisterDefinitionsPass(PassRegistry &);
44void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &);
45void initializeLoongArchOptWInstrsPass(PassRegistry &);
46void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &);
47void initializeLoongArchExpandPseudoPass(PassRegistry &);
48} // end namespace llvm
49
50#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
51