• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- ARM.h - Top-level interface for ARM representation ------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the entry points for global functions defined in the LLVM
11 // ARM back-end.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_ARM_ARM_H
16 #define LLVM_LIB_TARGET_ARM_ARM_H
17 
18 #include "llvm/IR/LegacyPassManager.h"
19 #include "llvm/Support/CodeGen.h"
20 #include <functional>
21 #include <vector>
22 
23 namespace llvm {
24 
25 class ARMAsmPrinter;
26 class ARMBaseTargetMachine;
27 class ARMRegisterBankInfo;
28 class ARMSubtarget;
29 struct BasicBlockInfo;
30 class Function;
31 class FunctionPass;
32 class InstructionSelector;
33 class MachineBasicBlock;
34 class MachineFunction;
35 class MachineInstr;
36 class MCInst;
37 class PassRegistry;
38 
39 
40 Pass *createARMParallelDSPPass();
41 FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM,
42                                CodeGenOpt::Level OptLevel);
43 FunctionPass *createA15SDOptimizerPass();
44 FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false);
45 FunctionPass *createARMExpandPseudoPass();
46 FunctionPass *createARMCodeGenPreparePass();
47 FunctionPass *createARMConstantIslandPass();
48 FunctionPass *createMLxExpansionPass();
49 FunctionPass *createThumb2ITBlockPass();
50 FunctionPass *createARMOptimizeBarriersPass();
51 FunctionPass *createThumb2SizeReductionPass(
52     std::function<bool(const Function &)> Ftor = nullptr);
53 InstructionSelector *
54 createARMInstructionSelector(const ARMBaseTargetMachine &TM, const ARMSubtarget &STI,
55                              const ARMRegisterBankInfo &RBI);
56 
57 void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
58                                   ARMAsmPrinter &AP);
59 
60 void computeBlockSize(MachineFunction *MF, MachineBasicBlock *MBB,
61                       BasicBlockInfo &BBI);
62 std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF);
63 
64 
65 void initializeARMParallelDSPPass(PassRegistry &);
66 void initializeARMLoadStoreOptPass(PassRegistry &);
67 void initializeARMPreAllocLoadStoreOptPass(PassRegistry &);
68 void initializeARMCodeGenPreparePass(PassRegistry &);
69 void initializeARMConstantIslandsPass(PassRegistry &);
70 void initializeARMExpandPseudoPass(PassRegistry &);
71 void initializeThumb2SizeReducePass(PassRegistry &);
72 
73 } // end namespace llvm
74 
75 #endif // LLVM_LIB_TARGET_ARM_ARM_H
76