OLD | NEW |
1 //===-- ARM.h - Top-level interface for ARM representation ------*- C++ -*-===// | 1 //===-- ARM.h - Top-level interface for ARM representation ------*- C++ -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file contains the entry points for global functions defined in the LLVM | 10 // This file contains the entry points for global functions defined in the LLVM |
11 // ARM back-end. | 11 // ARM back-end. |
12 // | 12 // |
13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
14 | 14 |
15 #ifndef LLVM_LIB_TARGET_ARM_ARM_H | 15 #ifndef LLVM_LIB_TARGET_ARM_ARM_H |
16 #define LLVM_LIB_TARGET_ARM_ARM_H | 16 #define LLVM_LIB_TARGET_ARM_ARM_H |
17 | 17 |
18 #include "llvm/Support/CodeGen.h" | 18 #include "llvm/Support/CodeGen.h" |
19 | 19 |
| 20 // @LOCALMOD (for LowerARMMachineInstrToMCInstPCRel) |
| 21 #include "llvm/MC/MCSymbol.h" |
| 22 |
20 namespace llvm { | 23 namespace llvm { |
21 | 24 |
22 class ARMAsmPrinter; | 25 class ARMAsmPrinter; |
23 class ARMBaseTargetMachine; | 26 class ARMBaseTargetMachine; |
24 class FunctionPass; | 27 class FunctionPass; |
25 class ImmutablePass; | 28 class ImmutablePass; |
26 class MachineInstr; | 29 class MachineInstr; |
27 class MCInst; | 30 class MCInst; |
28 class TargetLowering; | 31 class TargetLowering; |
29 class TargetMachine; | 32 class TargetMachine; |
30 | 33 |
31 FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM, | 34 FunctionPass *createARMISelDag(ARMBaseTargetMachine &TM, |
32 CodeGenOpt::Level OptLevel); | 35 CodeGenOpt::Level OptLevel); |
33 FunctionPass *createA15SDOptimizerPass(); | 36 FunctionPass *createA15SDOptimizerPass(); |
34 FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false); | 37 FunctionPass *createARMLoadStoreOptimizationPass(bool PreAlloc = false); |
35 FunctionPass *createARMExpandPseudoPass(); | 38 FunctionPass *createARMExpandPseudoPass(); |
36 FunctionPass *createARMGlobalBaseRegPass(); | 39 FunctionPass *createARMGlobalBaseRegPass(); |
37 FunctionPass *createARMGlobalMergePass(const TargetLowering* tli); | 40 FunctionPass *createARMGlobalMergePass(const TargetLowering* tli); |
38 FunctionPass *createARMConstantIslandPass(); | 41 FunctionPass *createARMConstantIslandPass(); |
39 FunctionPass *createMLxExpansionPass(); | 42 FunctionPass *createMLxExpansionPass(); |
40 FunctionPass *createThumb2ITBlockPass(); | 43 FunctionPass *createThumb2ITBlockPass(); |
41 FunctionPass *createARMOptimizeBarriersPass(); | 44 FunctionPass *createARMOptimizeBarriersPass(); |
42 FunctionPass *createThumb2SizeReductionPass(); | 45 FunctionPass *createThumb2SizeReductionPass(); |
43 | 46 |
| 47 /* @LOCALMOD-START */ |
| 48 FunctionPass *createARMNaClRewritePass(); |
| 49 /* @LOCALMOD-END */ |
| 50 |
44 /// \brief Creates an ARM-specific Target Transformation Info pass. | 51 /// \brief Creates an ARM-specific Target Transformation Info pass. |
45 ImmutablePass *createARMTargetTransformInfoPass(const ARMBaseTargetMachine *TM); | 52 ImmutablePass *createARMTargetTransformInfoPass(const ARMBaseTargetMachine *TM); |
46 | 53 |
47 void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, | 54 void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, |
48 ARMAsmPrinter &AP); | 55 ARMAsmPrinter &AP); |
49 | 56 |
| 57 /* @LOCALMOD-START */ |
| 58 // Used to lower the pc-relative MOVi16PIC / MOVTi16PIC pseudo instructions |
| 59 // into the real MOVi16 / MOVTi16 instructions. |
| 60 // See comment on MOVi16PIC for more details. |
| 61 void LowerARMMachineInstrToMCInstPCRel(const MachineInstr *MI, |
| 62 MCInst &OutMI, |
| 63 ARMAsmPrinter &AP, |
| 64 unsigned ImmIndex, |
| 65 unsigned PCIndex, |
| 66 MCSymbol *PCLabel, |
| 67 unsigned PCAdjustment); |
| 68 /* @LOCALMOD-END */ |
| 69 |
50 } // end namespace llvm; | 70 } // end namespace llvm; |
51 | 71 |
52 #endif | 72 #endif |
OLD | NEW |