| 1 | //===-- XCore.h - Top-level interface for XCore 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 | // XCore back-end. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIB_TARGET_XCORE_XCORE_H |
| 15 | #define LLVM_LIB_TARGET_XCORE_XCORE_H |
| 16 | |
| 17 | #include "MCTargetDesc/XCoreMCTargetDesc.h" |
| 18 | #include "llvm/CodeGen/MachineFunctionAnalysisManager.h" |
| 19 | #include "llvm/CodeGen/SelectionDAGISel.h" |
| 20 | #include "llvm/IR/Analysis.h" |
| 21 | #include "llvm/IR/PassManager.h" |
| 22 | #include "llvm/PassRegistry.h" |
| 23 | #include "llvm/Support/CodeGen.h" |
| 24 | #include "llvm/Target/TargetMachine.h" |
| 25 | |
| 26 | namespace llvm { |
| 27 | class FunctionPass; |
| 28 | class ModulePass; |
| 29 | class PassRegistry; |
| 30 | class TargetMachine; |
| 31 | class XCoreTargetMachine; |
| 32 | |
| 33 | void initializeXCoreLowerThreadLocalLegacyPass(PassRegistry &p); |
| 34 | |
| 35 | class XCoreFrameToArgsOffsetEliminationPass |
| 36 | : public RequiredPassInfoMixin<XCoreFrameToArgsOffsetEliminationPass> { |
| 37 | public: |
| 38 | PreservedAnalyses run(MachineFunction &MF, |
| 39 | MachineFunctionAnalysisManager &MFAM); |
| 40 | }; |
| 41 | |
| 42 | FunctionPass *createXCoreFrameToArgsOffsetEliminationLegacyPass(); |
| 43 | |
| 44 | class XCoreISelDAGToDAGPass : public SelectionDAGISelPass { |
| 45 | public: |
| 46 | XCoreISelDAGToDAGPass(XCoreTargetMachine &TM, CodeGenOptLevel OptLevel); |
| 47 | }; |
| 48 | |
| 49 | FunctionPass *createXCoreISelDagLegacyPass(XCoreTargetMachine &TM, |
| 50 | CodeGenOptLevel OptLevel); |
| 51 | |
| 52 | class XCoreLowerThreadLocalPass |
| 53 | : public RequiredPassInfoMixin<XCoreLowerThreadLocalPass> { |
| 54 | public: |
| 55 | PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM); |
| 56 | }; |
| 57 | |
| 58 | ModulePass *createXCoreLowerThreadLocalLegacyPass(); |
| 59 | void initializeXCoreAsmPrinterPass(PassRegistry &); |
| 60 | void initializeXCoreDAGToDAGISelLegacyPass(PassRegistry &); |
| 61 | |
| 62 | } // namespace llvm |
| 63 | |
| 64 | #endif |
| 65 |