diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-09 04:38:57 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-10-09 04:38:57 +0000 |
commit | 5c924d71173afc93aa0f0d115bd445a7496f4294 (patch) | |
tree | f8cc1da0f6670f2bfeeba7995953c724f1b14419 /llvm | |
parent | e30cb00dc0d5a3ba4798c8da8f8535d069f49ddb (diff) | |
download | bcm5719-llvm-5c924d71173afc93aa0f0d115bd445a7496f4294.tar.gz bcm5719-llvm-5c924d71173afc93aa0f0d115bd445a7496f4294.zip |
Target: Remove unused entities.
llvm-svn: 283690
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Target/TargetFrameLowering.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetInstrInfo.h | 50 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetLowering.h | 27 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetLoweringObjectFile.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetMachine.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetRegisterInfo.h | 5 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetInstrInfo.cpp | 29 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 10 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64ISelLowering.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64RegisterInfo.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseRegisterInfo.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCRegisterInfo.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 26 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.h | 8 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86RegisterInfo.h | 2 |
17 files changed, 4 insertions, 181 deletions
diff --git a/llvm/include/llvm/Target/TargetFrameLowering.h b/llvm/include/llvm/Target/TargetFrameLowering.h index 98065aca16f..4576f8c7582 100644 --- a/llvm/include/llvm/Target/TargetFrameLowering.h +++ b/llvm/include/llvm/Target/TargetFrameLowering.h @@ -179,12 +179,6 @@ public: virtual void adjustForHiPEPrologue(MachineFunction &MF, MachineBasicBlock &PrologueMBB) const {} - /// Adjust the prologue to add an allocation at a fixed offset from the frame - /// pointer. - virtual void - adjustForFrameAllocatePrologue(MachineFunction &MF, - MachineBasicBlock &PrologueMBB) const {} - /// spillCalleeSavedRegisters - Issues instruction(s) to spill all callee /// saved registers and returns true if it isn't possible / profitable to do /// so by issuing a series of store instructions via diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h index b5c0e331fd8..41804f82d3c 100644 --- a/llvm/include/llvm/Target/TargetInstrInfo.h +++ b/llvm/include/llvm/Target/TargetInstrInfo.h @@ -611,40 +611,6 @@ public: virtual void ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail, MachineBasicBlock *NewDest) const; - /// Get an instruction that performs an unconditional branch to the given - /// symbol. - virtual void - getUnconditionalBranch(MCInst &MI, - const MCSymbolRefExpr *BranchTarget) const { - llvm_unreachable("Target didn't implement " - "TargetInstrInfo::getUnconditionalBranch!"); - } - - /// Get a machine trap instruction. - virtual void getTrap(MCInst &MI) const { - llvm_unreachable("Target didn't implement TargetInstrInfo::getTrap!"); - } - - /// Get a number of bytes that suffices to hold - /// either the instruction returned by getUnconditionalBranch or the - /// instruction returned by getTrap. This only makes sense because - /// getUnconditionalBranch returns a single, specific instruction. This - /// information is needed by the jumptable construction code, since it must - /// decide how many bytes to use for a jumptable entry so it can generate the - /// right mask. - /// - /// Note that if the jumptable instruction requires alignment, then that - /// alignment should be factored into this required bound so that the - /// resulting bound gives the right alignment for the instruction. - virtual unsigned getJumpInstrTableEntryBound() const { - // This method gets called by LLVMTargetMachine always, so it can't fail - // just because there happens to be no implementation for this target. - // Any code that tries to use a jumptable annotation without defining - // getUnconditionalBranch on the appropriate Target will fail anyway, and - // the value returned here won't matter in that case. - return 0; - } - /// Return true if it's legal to split the given basic /// block at the specified instruction (i.e. instruction would be the start /// of a new basic block). @@ -1293,22 +1259,6 @@ public: const MachineInstr &UseMI, unsigned UseIdx) const; - /// Compute and return the latency of the given data dependent def and use - /// when the operand indices are already known. UseMI may be \c nullptr for - /// an unknown use. - /// - /// FindMin may be set to get the minimum vs. expected latency. Minimum - /// latency is used for scheduling groups, while expected latency is for - /// instruction cost and critical path. - /// - /// Depending on the subtarget's itinerary properties, this may or may not - /// need to call getOperandLatency(). For most subtargets, we don't need - /// DefIdx or UseIdx to compute min latency. - unsigned computeOperandLatency(const InstrItineraryData *ItinData, - const MachineInstr &DefMI, unsigned DefIdx, - const MachineInstr *UseMI, - unsigned UseIdx) const; - /// Compute the instruction latency of a given instruction. /// If the instruction has higher cost when predicated, it's returned via /// PredCost. diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h index 072edd14e70..741c2f7c21e 100644 --- a/llvm/include/llvm/Target/TargetLowering.h +++ b/llvm/include/llvm/Target/TargetLowering.h @@ -191,9 +191,6 @@ public: return getPointerTy(DL); } - /// Return true if the select operation is expensive for this target. - bool isSelectExpensive() const { return SelectIsExpensive; } - virtual bool isSelectSupported(SelectSupportKind /*kind*/) const { return true; } @@ -1378,12 +1375,6 @@ protected: StackPointerRegisterToSaveRestore = R; } - /// Tells the code generator not to expand operations into sequences that use - /// the select operations if possible. - void setSelectIsExpensive(bool isExpensive = true) { - SelectIsExpensive = isExpensive; - } - /// Tells the code generator that the target has multiple (allocatable) /// condition registers that can be used to store the results of comparisons /// for use by selects and conditional branches. With multiple condition @@ -1425,15 +1416,6 @@ protected: RegClassForVT[VT.SimpleTy] = RC; } - /// Remove all register classes. - void clearRegisterClasses() { - std::fill(std::begin(RegClassForVT), std::end(RegClassForVT), nullptr); - } - - /// \brief Remove all operation actions. - void clearOperationActions() { - } - /// Return the largest legal super-reg register class of the register class /// for the specified type and its associated "cost". virtual std::pair<const TargetRegisterClass *, uint8_t> @@ -1761,11 +1743,6 @@ public: /// In other words, unless the target performs a post-isel load combining, /// this information should not be provided because it will generate more /// loads. - virtual bool hasPairedLoad(Type * /*LoadedType*/, - unsigned & /*RequiredAligment*/) const { - return false; - } - virtual bool hasPairedLoad(EVT /*LoadedType*/, unsigned & /*RequiredAligment*/) const { return false; @@ -1915,10 +1892,6 @@ public: private: const TargetMachine &TM; - /// Tells the code generator not to expand operations into sequences that use - /// the select operations if possible. - bool SelectIsExpensive; - /// Tells the code generator that the target has multiple (allocatable) /// condition registers that can be used to store the results of comparisons /// for use by selects and conditional branches. With multiple condition diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h index b29d3a076a0..f38b6b489e8 100644 --- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h +++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h @@ -120,12 +120,6 @@ public: getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const = 0; - /// Allow the target to completely override section assignment of a global. - virtual const MCSection * - getSpecialCasedSectionGlobals(const GlobalValue *GV, SectionKind Kind) const { - return nullptr; - } - /// Return an MCExpr to use for a reference to the specified global variable /// from exception handling information. virtual const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h index 9c5dfee436f..32b34450c0d 100644 --- a/llvm/include/llvm/Target/TargetMachine.h +++ b/llvm/include/llvm/Target/TargetMachine.h @@ -193,12 +193,6 @@ public: bool shouldPrintMachineCode() const { return Options.PrintMachineCode; } - /// Returns the default value of asm verbosity. - /// - bool getAsmVerbosityDefault() const { - return Options.MCOptions.AsmVerbose; - } - bool getUniqueSectionNames() const { return Options.UniqueSectionNames; } /// Return true if data objects should be emitted into their own section, diff --git a/llvm/include/llvm/Target/TargetRegisterInfo.h b/llvm/include/llvm/Target/TargetRegisterInfo.h index 5eb4fe8ae69..0d0bfa9d454 100644 --- a/llvm/include/llvm/Target/TargetRegisterInfo.h +++ b/llvm/include/llvm/Target/TargetRegisterInfo.h @@ -447,11 +447,6 @@ public: virtual const MCPhysReg* getCalleeSavedRegs(const MachineFunction *MF) const = 0; - virtual const MCPhysReg* - getCalleeSavedRegsViaCopy(const MachineFunction *MF) const { - return nullptr; - } - /// Return a mask of call-preserved registers for the given calling convention /// on the current function. The mask should include all call-preserved /// aliases. This is used by the register allocator to determine which diff --git a/llvm/lib/CodeGen/TargetInstrInfo.cpp b/llvm/lib/CodeGen/TargetInstrInfo.cpp index 7ac2210ac52..4fdb6c54aa9 100644 --- a/llvm/lib/CodeGen/TargetInstrInfo.cpp +++ b/llvm/lib/CodeGen/TargetInstrInfo.cpp @@ -1100,35 +1100,6 @@ int TargetInstrInfo::computeDefOperandLatency( return -1; } -unsigned TargetInstrInfo::computeOperandLatency( - const InstrItineraryData *ItinData, const MachineInstr &DefMI, - unsigned DefIdx, const MachineInstr *UseMI, unsigned UseIdx) const { - - int DefLatency = computeDefOperandLatency(ItinData, DefMI); - if (DefLatency >= 0) - return DefLatency; - - assert(ItinData && !ItinData->isEmpty() && "computeDefOperandLatency fail"); - - int OperLatency = 0; - if (UseMI) - OperLatency = getOperandLatency(ItinData, DefMI, DefIdx, *UseMI, UseIdx); - else { - unsigned DefClass = DefMI.getDesc().getSchedClass(); - OperLatency = ItinData->getOperandCycle(DefClass, DefIdx); - } - if (OperLatency >= 0) - return OperLatency; - - // No operand latency was found. - unsigned InstrLatency = getInstrLatency(ItinData, DefMI); - - // Expected latency is the max of the stage latency and itinerary props. - InstrLatency = std::max(InstrLatency, - defaultDefLatency(ItinData->SchedModel, DefMI)); - return InstrLatency; -} - bool TargetInstrInfo::getRegSequenceInputs( const MachineInstr &MI, unsigned DefIdx, SmallVectorImpl<RegSubRegPairAndIdx> &InputRegs) const { diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 74ed7bc7331..187aa95d769 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -806,7 +806,6 @@ TargetLoweringBase::TargetLoweringBase(const TargetMachine &tm) : TM(tm) { = MaxStoresPerMemmoveOptSize = 4; UseUnderscoreSetJmp = false; UseUnderscoreLongJmp = false; - SelectIsExpensive = false; HasMultipleConditionRegisters = false; HasExtractBitsInsn = false; JumpIsExpensive = JumpIsExpensiveOverride; diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 7647ea2fd65..17cf8e0641e 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -7058,16 +7058,6 @@ bool AArch64TargetLowering::isExtFreeImpl(const Instruction *Ext) const { return true; } -bool AArch64TargetLowering::hasPairedLoad(Type *LoadedType, - unsigned &RequiredAligment) const { - if (!LoadedType->isIntegerTy() && !LoadedType->isFloatTy()) - return false; - // Cyclone supports unaligned accesses. - RequiredAligment = 0; - unsigned NumBits = LoadedType->getPrimitiveSizeInBits(); - return NumBits == 32 || NumBits == 64; -} - bool AArch64TargetLowering::hasPairedLoad(EVT LoadedType, unsigned &RequiredAligment) const { if (!LoadedType.isSimple() || diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.h b/llvm/lib/Target/AArch64/AArch64ISelLowering.h index 882ed19480b..28d158cc66c 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.h +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.h @@ -309,8 +309,6 @@ public: bool isZExtFree(EVT VT1, EVT VT2) const override; bool isZExtFree(SDValue Val, EVT VT2) const override; - bool hasPairedLoad(Type *LoadedType, - unsigned &RequiredAligment) const override; bool hasPairedLoad(EVT LoadedType, unsigned &RequiredAligment) const override; unsigned getMaxSupportedInterleaveFactor() const override { return 4; } diff --git a/llvm/lib/Target/AArch64/AArch64RegisterInfo.h b/llvm/lib/Target/AArch64/AArch64RegisterInfo.h index f076b4ea365..098657fe883 100644 --- a/llvm/lib/Target/AArch64/AArch64RegisterInfo.h +++ b/llvm/lib/Target/AArch64/AArch64RegisterInfo.h @@ -35,7 +35,7 @@ public: /// Code Generation virtual methods... const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; const MCPhysReg * - getCalleeSavedRegsViaCopy(const MachineFunction *MF) const override; + getCalleeSavedRegsViaCopy(const MachineFunction *MF) const; const uint32_t *getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override; diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp index e214164facb..6f75c9cd924 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp @@ -443,7 +443,6 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(const TargetMachine &TM, // (Section 7.3) setHasFloatingPointExceptions(Subtarget->hasFPExceptions()); - setSelectIsExpensive(false); PredictableSelectIsExpensive = false; // We want to find all load dependencies for long chains of stores to enable diff --git a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h index 1eee94857e0..06d0f790241 100644 --- a/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h +++ b/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h @@ -99,7 +99,7 @@ public: /// Code Generation virtual methods... const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; const MCPhysReg * - getCalleeSavedRegsViaCopy(const MachineFunction *MF) const override; + getCalleeSavedRegsViaCopy(const MachineFunction *MF) const; const uint32_t *getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override; const uint32_t *getNoPreservedMask() const override; diff --git a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h index 459502eeb2e..4a96327fe55 100644 --- a/llvm/lib/Target/PowerPC/PPCRegisterInfo.h +++ b/llvm/lib/Target/PowerPC/PPCRegisterInfo.h @@ -75,7 +75,7 @@ public: /// Code Generation virtual methods... const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override; - const MCPhysReg *getCalleeSavedRegsViaCopy(const MachineFunction *MF) const override; + const MCPhysReg *getCalleeSavedRegsViaCopy(const MachineFunction *MF) const; const uint32_t *getCallPreservedMask(const MachineFunction &MF, CallingConv::ID CC) const override; const uint32_t *getNoPreservedMask() const override; diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index ae1265042e1..8211f57b243 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -8073,32 +8073,6 @@ void X86InstrInfo::getNoopForMachoTarget(MCInst &NopInst) const { NopInst.setOpcode(X86::NOOP); } -// This code must remain in sync with getJumpInstrTableEntryBound in this class! -// In particular, getJumpInstrTableEntryBound must always return an upper bound -// on the encoding lengths of the instructions generated by -// getUnconditionalBranch and getTrap. -void X86InstrInfo::getUnconditionalBranch( - MCInst &Branch, const MCSymbolRefExpr *BranchTarget) const { - Branch.setOpcode(X86::JMP_1); - Branch.addOperand(MCOperand::createExpr(BranchTarget)); -} - -// This code must remain in sync with getJumpInstrTableEntryBound in this class! -// In particular, getJumpInstrTableEntryBound must always return an upper bound -// on the encoding lengths of the instructions generated by -// getUnconditionalBranch and getTrap. -void X86InstrInfo::getTrap(MCInst &MI) const { - MI.setOpcode(X86::TRAP); -} - -// See getTrap and getUnconditionalBranch for conditions on the value returned -// by this function. -unsigned X86InstrInfo::getJumpInstrTableEntryBound() const { - // 5 bytes suffice: JMP_4 Symbol@PLT is uses 1 byte (E9) for the JMP_4 and 4 - // bytes for the symbol offset. And TRAP is ud2, which is two bytes (0F 0B). - return 5; -} - bool X86InstrInfo::isHighLatencyDef(int opc) const { switch (opc) { default: return false; diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index f5c7c3855fc..bc43820a024 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -488,14 +488,6 @@ public: unsigned Size, unsigned Alignment, bool AllowCommute) const; - void - getUnconditionalBranch(MCInst &Branch, - const MCSymbolRefExpr *BranchTarget) const override; - - void getTrap(MCInst &MI) const override; - - unsigned getJumpInstrTableEntryBound() const override; - bool isHighLatencyDef(int opc) const override; bool hasHighOperandLatency(const TargetSchedModel &SchedModel, diff --git a/llvm/lib/Target/X86/X86RegisterInfo.h b/llvm/lib/Target/X86/X86RegisterInfo.h index 468012b4394..58fa31e94fb 100644 --- a/llvm/lib/Target/X86/X86RegisterInfo.h +++ b/llvm/lib/Target/X86/X86RegisterInfo.h @@ -100,7 +100,7 @@ public: const MCPhysReg * getCalleeSavedRegs(const MachineFunction* MF) const override; const MCPhysReg * - getCalleeSavedRegsViaCopy(const MachineFunction *MF) const override; + getCalleeSavedRegsViaCopy(const MachineFunction *MF) const; const uint32_t *getCallPreservedMask(const MachineFunction &MF, CallingConv::ID) const override; const uint32_t *getNoPreservedMask() const override; |