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
26namespace llvm {
27class FunctionPass;
28class ModulePass;
29class PassRegistry;
30class TargetMachine;
31class XCoreTargetMachine;
32
33void initializeXCoreLowerThreadLocalLegacyPass(PassRegistry &p);
34
35class XCoreFrameToArgsOffsetEliminationPass
36 : public RequiredPassInfoMixin<XCoreFrameToArgsOffsetEliminationPass> {
37public:
38 PreservedAnalyses run(MachineFunction &MF,
39 MachineFunctionAnalysisManager &MFAM);
40};
41
42FunctionPass *createXCoreFrameToArgsOffsetEliminationLegacyPass();
43
44class XCoreISelDAGToDAGPass : public SelectionDAGISelPass {
45public:
46 XCoreISelDAGToDAGPass(XCoreTargetMachine &TM, CodeGenOptLevel OptLevel);
47};
48
49FunctionPass *createXCoreISelDagLegacyPass(XCoreTargetMachine &TM,
50 CodeGenOptLevel OptLevel);
51
52class XCoreLowerThreadLocalPass
53 : public RequiredPassInfoMixin<XCoreLowerThreadLocalPass> {
54public:
55 PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM);
56};
57
58ModulePass *createXCoreLowerThreadLocalLegacyPass();
59void initializeXCoreAsmPrinterPass(PassRegistry &);
60void initializeXCoreDAGToDAGISelLegacyPass(PassRegistry &);
61
62} // namespace llvm
63
64#endif
65