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,
39 CodeGenOptLevel OptLevel);
40FunctionPass *createLoongArchMergeBaseOffsetOptPass();
41FunctionPass *createLoongArchOptWInstrsPass();
42FunctionPass *createLoongArchPreRAExpandPseudoPass();
43FunctionPass *createLoongArchExpandPseudoPass();
44void initializeLoongArchAsmPrinterPass(PassRegistry &);
45void initializeLoongArchDAGToDAGISelLegacyPass(PassRegistry &);
46void initializeLoongArchDeadRegisterDefinitionsPass(PassRegistry &);
47void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &);
48void initializeLoongArchMergeBaseOffsetOptPass(PassRegistry &);
49void initializeLoongArchOptWInstrsPass(PassRegistry &);
50void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &);
51void initializeLoongArchExpandPseudoPass(PassRegistry &);
52} // end namespace llvm
53
54#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
55