1 //===-- ARM.h - Top-level interface for ARM representation ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the entry points for global functions defined in the LLVM
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_ARM_ARM_H
16 #define LLVM_LIB_TARGET_ARM_ARM_H
18 #include "llvm/Support/CodeGen.h"
25 class ARMBaseTargetMachine;
26 class ARMRegisterBankInfo;
28 struct BasicBlockInfo;
31 class InstructionSelector;
32 class MachineBasicBlock;
33 class MachineFunction;
38 FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM,
39 CodeGenOpt::Level OptLevel);
40 FunctionPass *createA15SDOptimizerPass();
41 FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false);
42 FunctionPass *createARMExpandPseudoPass();
43 FunctionPass *createARMConstantIslandPass();
44 FunctionPass *createMLxExpansionPass();
45 FunctionPass *createThumb2ITBlockPass();
46 FunctionPass *createARMOptimizeBarriersPass();
47 FunctionPass *createThumb2SizeReductionPass(
48 std::function<bool(const Function &)> Ftor = nullptr);
50 createARMInstructionSelector(const ARMBaseTargetMachine &TM, const ARMSubtarget &STI,
51 const ARMRegisterBankInfo &RBI);
53 void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
56 void computeBlockSize(MachineFunction *MF, MachineBasicBlock *MBB,
58 std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF);
60 void initializeARMLoadStoreOptPass(PassRegistry &);
61 void initializeARMPreAllocLoadStoreOptPass(PassRegistry &);
62 void initializeARMConstantIslandsPass(PassRegistry &);
63 void initializeARMExpandPseudoPass(PassRegistry &);
64 void initializeThumb2SizeReducePass(PassRegistry &);
66 } // end namespace llvm
68 #endif // LLVM_LIB_TARGET_ARM_ARM_H