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 *createLoongArchMemoryBarrierOptPass();
41FunctionPass *createLoongArchMergeBaseOffsetOptPass();
42FunctionPass *createLoongArchOptWInstrsPass();
43FunctionPass *createLoongArchPreRAExpandPseudoPass();
44FunctionPass *createLoongArchExpandPseudoPass();
45FunctionPass *createLoongArchLateBranchOptPass();
46void initializeLoongArchAsmPrinterPass(PassRegistry &);
47void initializeLoongArchDAGToDAGISelLegacyPass(PassRegistry &);
48void initializeLoongArchDeadRegisterDefinitionsPass(PassRegistry &);
49void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &);
50void initializeLoongArchMemoryBarrierOptPass(PassRegistry &);
51void initializeLoongArchMergeBaseOffsetOptPass(PassRegistry &);
52void initializeLoongArchOptWInstrsPass(PassRegistry &);
53void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &);
54void initializeLoongArchExpandPseudoPass(PassRegistry &);
55void initializeLoongArchLateBranchOptPass(PassRegistry &);
56} // end namespace llvm
57
58#endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
59