llvm.org GIT mirror llvm / 47d34ab
Temporarily revert r210953 in an attempt to bring the ARM buildbots back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210996 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
9 changed file(s) with 24 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
1414 #include "ARM.h"
1515 #include "ARMBaseInstrInfo.h"
1616 #include "ARMConstantPoolValue.h"
17 #include "ARMMachineFunctionInfo.h"
1817 #include "ARMRelocations.h"
1918 #include "ARMSubtarget.h"
2019 #include "ARMTargetMachine.h"
1212
1313 #include "ARMJITInfo.h"
1414 #include "ARMConstantPoolValue.h"
15 #include "ARMMachineFunctionInfo.h"
1615 #include "ARMRelocations.h"
1716 #include "MCTargetDesc/ARMBaseInfo.h"
1817 #include "llvm/CodeGen/JITCodeEmitter.h"
334333 }
335334 }
336335 }
337
338 void ARMJITInfo::Initialize(const MachineFunction &MF, bool isPIC) {
339 const ARMFunctionInfo *AFI = MF.getInfo();
340 ConstPoolId2AddrMap.resize(AFI->getNumPICLabels());
341 JumpTableId2AddrMap.resize(AFI->getNumJumpTables());
342 IsPIC = isPIC;
343 }
1313 #ifndef ARMJITINFO_H
1414 #define ARMJITINFO_H
1515
16 #include "ARMMachineFunctionInfo.h"
1617 #include "llvm/ADT/DenseMap.h"
1718 #include "llvm/ADT/SmallVector.h"
1819 #include "llvm/CodeGen/MachineConstantPool.h"
101102 /// Resize constant pool ids to CONSTPOOL_ENTRY addresses map; resize
102103 /// jump table ids to jump table bases map; remember if codegen relocation
103104 /// model is PIC.
104 void Initialize(const MachineFunction &MF, bool isPIC);
105 void Initialize(const MachineFunction &MF, bool isPIC) {
106 const ARMFunctionInfo *AFI = MF.getInfo();
107 ConstPoolId2AddrMap.resize(AFI->getNumPICLabels());
108 JumpTableId2AddrMap.resize(AFI->getNumJumpTables());
109 IsPIC = isPIC;
110 }
105111
106112 /// getConstantPoolEntryAddr - The ARM target puts all constant
107113 /// pool entries into constant islands. This returns the address of the
1111 using namespace llvm;
1212
1313 void ARMFunctionInfo::anchor() { }
14
15 ARMFunctionInfo::ARMFunctionInfo(MachineFunction &MF)
16 : isThumb(MF.getTarget().getSubtarget().isThumb()),
17 hasThumb2(MF.getTarget().getSubtarget().hasThumb2()),
18 StByValParamsPadding(0), ArgRegsSaveSize(0), HasStackFrame(false),
19 RestoreSPFromFP(false), LRSpilledForFarJump(false),
20 FramePtrSpillOffset(0), GPRCS1Offset(0), GPRCS2Offset(0), DPRCSOffset(0),
21 GPRCS1Size(0), GPRCS2Size(0), DPRCSSize(0), JumpTableUId(0),
22 PICLabelUId(0), VarArgsFrameIndex(0), HasITBlocks(false),
23 GlobalBaseReg(0) {}
129129 JumpTableUId(0), PICLabelUId(0),
130130 VarArgsFrameIndex(0), HasITBlocks(false), GlobalBaseReg(0) {}
131131
132 explicit ARMFunctionInfo(MachineFunction &MF);
132 explicit ARMFunctionInfo(MachineFunction &MF) :
133 isThumb(MF.getTarget().getSubtarget().isThumb()),
134 hasThumb2(MF.getTarget().getSubtarget().hasThumb2()),
135 StByValParamsPadding(0),
136 ArgRegsSaveSize(0), HasStackFrame(false), RestoreSPFromFP(false),
137 LRSpilledForFarJump(false),
138 FramePtrSpillOffset(0), GPRCS1Offset(0), GPRCS2Offset(0), DPRCSOffset(0),
139 GPRCS1Size(0), GPRCS2Size(0), DPRCSSize(0),
140 JumpTableUId(0), PICLabelUId(0),
141 VarArgsFrameIndex(0), HasITBlocks(false), GlobalBaseReg(0) {}
133142
134143 bool isThumbFunction() const { return isThumb; }
135144 bool isThumb1OnlyFunction() const { return isThumb && !hasThumb2; }
147147 ARMProcClass(None), stackAlignment(4), CPUString(CPU), IsLittle(IsLittle),
148148 TargetTriple(TT), Options(Options), TargetABI(ARM_ABI_UNKNOWN),
149149 DL(computeDataLayout(initializeSubtargetDependencies(CPU, FS))),
150 TSInfo(DL), JITInfo() {}
150 TSInfo(DL) {}
151151
152152 void ARMSubtarget::initializeEnvironment() {
153153 HasV4TOps = false;
1313 #ifndef ARMSUBTARGET_H
1414 #define ARMSUBTARGET_H
1515
16 #include "ARMJITInfo.h"
1716 #include "ARMSelectionDAGInfo.h"
1817 #include "MCTargetDesc/ARMMCTargetDesc.h"
1918 #include "llvm/ADT/Triple.h"
256255
257256 const DataLayout *getDataLayout() const { return &DL; }
258257 const ARMSelectionDAGInfo *getSelectionDAGInfo() const { return &TSInfo; }
259 ARMJITInfo *getJITInfo() { return &JITInfo; }
260258
261259 private:
262260 const DataLayout DL;
263261 ARMSelectionDAGInfo TSInfo;
264 ARMJITInfo JITInfo;
265262
266263 void initializeEnvironment();
267264 void resetSubtargetFeatures(StringRef CPU, StringRef FS);
5151 CodeGenOpt::Level OL,
5252 bool isLittle)
5353 : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
54 Subtarget(TT, CPU, FS, isLittle, Options) {
54 Subtarget(TT, CPU, FS, isLittle, Options), JITInfo() {
5555
5656 // Default to triple-appropriate float ABI
5757 if (Options.FloatABIType == FloatABI::Default)
3131 class ARMBaseTargetMachine : public LLVMTargetMachine {
3232 protected:
3333 ARMSubtarget Subtarget;
34
35 private:
36 ARMJITInfo JITInfo;
37
3438 public:
3539 ARMBaseTargetMachine(const Target &T, StringRef TT,
3640 StringRef CPU, StringRef FS,
3943 CodeGenOpt::Level OL,
4044 bool isLittle);
4145
46 ARMJITInfo *getJITInfo() override { return &JITInfo; }
4247 const ARMSubtarget *getSubtargetImpl() const override { return &Subtarget; }
4348 const ARMTargetLowering *getTargetLowering() const override {
4449 // Implemented by derived classes