| 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 | |
| 20 | namespace llvm { |
| 21 | class AsmPrinter; |
| 22 | class FunctionPass; |
| 23 | class LoongArchTargetMachine; |
| 24 | class MCInst; |
| 25 | class MCOperand; |
| 26 | class MachineInstr; |
| 27 | class MachineOperand; |
| 28 | class PassRegistry; |
| 29 | |
| 30 | bool lowerLoongArchMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, |
| 31 | AsmPrinter &AP); |
| 32 | bool lowerLoongArchMachineOperandToMCOperand(const MachineOperand &MO, |
| 33 | MCOperand &MCOp, |
| 34 | const AsmPrinter &AP); |
| 35 | |
| 36 | FunctionPass *createLoongArchDeadRegisterDefinitionsPass(); |
| 37 | FunctionPass *createLoongArchExpandAtomicPseudoPass(); |
| 38 | FunctionPass *createLoongArchISelDag(LoongArchTargetMachine &TM, |
| 39 | CodeGenOptLevel OptLevel); |
| 40 | FunctionPass *createLoongArchMergeBaseOffsetOptPass(); |
| 41 | FunctionPass *createLoongArchOptWInstrsPass(); |
| 42 | FunctionPass *createLoongArchPreRAExpandPseudoPass(); |
| 43 | FunctionPass *createLoongArchExpandPseudoPass(); |
| 44 | void initializeLoongArchAsmPrinterPass(PassRegistry &); |
| 45 | void initializeLoongArchDAGToDAGISelLegacyPass(PassRegistry &); |
| 46 | void initializeLoongArchDeadRegisterDefinitionsPass(PassRegistry &); |
| 47 | void initializeLoongArchExpandAtomicPseudoPass(PassRegistry &); |
| 48 | void initializeLoongArchMergeBaseOffsetOptPass(PassRegistry &); |
| 49 | void initializeLoongArchOptWInstrsPass(PassRegistry &); |
| 50 | void initializeLoongArchPreRAExpandPseudoPass(PassRegistry &); |
| 51 | void initializeLoongArchExpandPseudoPass(PassRegistry &); |
| 52 | } // end namespace llvm |
| 53 | |
| 54 | #endif // LLVM_LIB_TARGET_LOONGARCH_LOONGARCH_H |
| 55 | |