1 //===-- LoongArch.h - Top-level interface for LoongArch ---------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file contains the entry points for global functions defined in the LLVM
10 // LoongArch back-end.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
15 #define LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H
17 #include "MCTargetDesc/LoongArchBaseInfo.h"
18 #include "llvm/Target/TargetMachine.h"
23 class LoongArchTargetMachine
;
30 bool lowerLoongArchMachineInstrToMCInst(const MachineInstr
*MI
, MCInst
&OutMI
,
32 bool lowerLoongArchMachineOperandToMCOperand(const MachineOperand
&MO
,
34 const AsmPrinter
&AP
);
36 FunctionPass
*createLoongArchDeadRegisterDefinitionsPass();
37 FunctionPass
*createLoongArchExpandAtomicPseudoPass();
38 FunctionPass
*createLoongArchISelDag(LoongArchTargetMachine
&TM
);
39 FunctionPass
*createLoongArchOptWInstrsPass();
40 FunctionPass
*createLoongArchPreRAExpandPseudoPass();
41 FunctionPass
*createLoongArchExpandPseudoPass();
42 void initializeLoongArchDAGToDAGISelLegacyPass(PassRegistry
&);
43 void initializeLoongArchDeadRegisterDefinitionsPass(PassRegistry
&);
44 void initializeLoongArchExpandAtomicPseudoPass(PassRegistry
&);
45 void initializeLoongArchOptWInstrsPass(PassRegistry
&);
46 void initializeLoongArchPreRAExpandPseudoPass(PassRegistry
&);
47 void initializeLoongArchExpandPseudoPass(PassRegistry
&);
48 } // end namespace llvm
50 #endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H