| 1 | //===-- Lanai.h - Top-level interface for Lanai representation --*- 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 | // Lanai back-end. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_LANAI_LANAI_H |
| 15 | #define LLVM_LIB_TARGET_LANAI_LANAI_H |
| 16 | |
| 17 | #include "llvm/CodeGen/MachineFunctionAnalysisManager.h" |
| 18 | #include "llvm/CodeGen/SelectionDAGISel.h" |
| 19 | #include "llvm/IR/Analysis.h" |
| 20 | #include "llvm/IR/PassManager.h" |
| 21 | #include "llvm/Pass.h" |
| 22 | |
| 23 | namespace llvm { |
| 24 | class FunctionPass; |
| 25 | class LanaiTargetMachine; |
| 26 | class PassRegistry; |
| 27 | |
| 28 | // createLanaiISelDagPass - This pass converts a legalized DAG into a |
| 29 | // Lanai-specific DAG, ready for instruction scheduling. |
| 30 | class LanaiISelDAGToDAGPass : public SelectionDAGISelPass { |
| 31 | public: |
| 32 | LanaiISelDAGToDAGPass(LanaiTargetMachine &TM); |
| 33 | }; |
| 34 | |
| 35 | FunctionPass *createLanaiISelDagLegacyPass(LanaiTargetMachine &TM); |
| 36 | |
| 37 | // createLanaiDelaySlotFillerPass - This pass fills delay slots |
| 38 | // with useful instructions or nop's |
| 39 | class LanaiDelaySlotFillerPass |
| 40 | : public PassInfoMixin<LanaiDelaySlotFillerPass> { |
| 41 | public: |
| 42 | PreservedAnalyses run(MachineFunction &MF, |
| 43 | MachineFunctionAnalysisManager &MFAM); |
| 44 | }; |
| 45 | |
| 46 | FunctionPass * |
| 47 | createLanaiDelaySlotFillerLegacyPass(const LanaiTargetMachine &TM); |
| 48 | |
| 49 | // createLanaiMemAluCombinerPass - This pass combines loads/stores and |
| 50 | // arithmetic operations. |
| 51 | class LanaiMemAluCombinerPass : public PassInfoMixin<LanaiMemAluCombinerPass> { |
| 52 | public: |
| 53 | PreservedAnalyses run(MachineFunction &MF, |
| 54 | MachineFunctionAnalysisManager &MFAM); |
| 55 | }; |
| 56 | |
| 57 | FunctionPass *createLanaiMemAluCombinerLegacyPass(); |
| 58 | |
| 59 | void initializeLanaiAsmPrinterPass(PassRegistry &); |
| 60 | void initializeLanaiDAGToDAGISelLegacyPass(PassRegistry &); |
| 61 | void initializeLanaiMemAluCombinerLegacyPass(PassRegistry &); |
| 62 | |
| 63 | } // namespace llvm |
| 64 | |
| 65 | #endif // LLVM_LIB_TARGET_LANAI_LANAI_H |
| 66 |