From 0e0d616fa28ff7a109bda1d323a14bd19723d0dd Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 6 Dec 2020 14:55:04 -0800 Subject: [PATCH] [CodeGen] Delete 15 unused declarations Notes about a few declarations: * LiveVariables::RegisterDefIsDead: deleted by r47927 * createForwardControlFlowIntegrityPass, createJumpInstrTablesPass: deleted by r230780 * RegScavenger::setLiveInsUsed: deleted by r292543 * ScheduleDAGInstrs::{toggleKillFlag,startBlockForKills}: deleted by r304055 * Localizer::shouldLocalize: remnant of D75207 * DwarfDebug::addSectionLabel: deleted by r373273 --- llvm/include/llvm/CodeGen/FastISel.h | 1 - llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h | 1 - llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h | 3 --- llvm/include/llvm/CodeGen/GlobalISel/Localizer.h | 3 --- llvm/include/llvm/CodeGen/LexicalScopes.h | 3 --- llvm/include/llvm/CodeGen/Passes.h | 4 ---- llvm/include/llvm/CodeGen/RDFRegisters.h | 6 ------ llvm/include/llvm/CodeGen/ResourcePriorityQueue.h | 1 - llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h | 10 ---------- llvm/include/llvm/CodeGen/SelectionDAG.h | 4 ---- llvm/include/llvm/Support/YAMLParser.h | 1 - llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 1 - 12 files changed, 38 deletions(-) diff --git a/llvm/include/llvm/CodeGen/FastISel.h b/llvm/include/llvm/CodeGen/FastISel.h index 5c1ebc7..0463272 100644 --- a/llvm/include/llvm/CodeGen/FastISel.h +++ b/llvm/include/llvm/CodeGen/FastISel.h @@ -524,7 +524,6 @@ protected: bool selectFreeze(const User *I); bool selectCast(const User *I, unsigned Opcode); bool selectExtractValue(const User *U); - bool selectInsertValue(const User *I); bool selectXRayCustomEvent(const CallInst *II); bool selectXRayTypedEvent(const CallInst *II); diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h index 20db2c4..eafed37 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h @@ -44,7 +44,6 @@ class GISelKnownBits : public GISelChangeObserver { public: GISelKnownBits(MachineFunction &MF, unsigned MaxDepth = 6); virtual ~GISelKnownBits() = default; - void setMF(MachineFunction &MF); const MachineFunction &getMachineFunction() const { return MF; diff --git a/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h b/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h index e59bf1b..690e84f7 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/Legalizer.h @@ -64,9 +64,6 @@ public: MachineFunctionProperties::Property::NoPHIs); } - bool combineExtracts(MachineInstr &MI, MachineRegisterInfo &MRI, - const TargetInstrInfo &TII); - bool runOnMachineFunction(MachineFunction &MF) override; static MFResult diff --git a/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h b/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h index 67e4506..57f6c03 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/Localizer.h @@ -52,9 +52,6 @@ private: /// TTI used for getting remat costs for instructions. TargetTransformInfo *TTI; - /// Check whether or not \p MI needs to be moved close to its uses. - bool shouldLocalize(const MachineInstr &MI); - /// Check if \p MOUse is used in the same basic block as \p Def. /// If the use is in the same block, we say it is local. /// When the use is not local, \p InsertMBB will contain the basic diff --git a/llvm/include/llvm/CodeGen/LexicalScopes.h b/llvm/include/llvm/CodeGen/LexicalScopes.h index bac850d..9617ba8 100644 --- a/llvm/include/llvm/CodeGen/LexicalScopes.h +++ b/llvm/include/llvm/CodeGen/LexicalScopes.h @@ -194,9 +194,6 @@ public: return I != LexicalScopeMap.end() ? &I->second : nullptr; } - /// dump - Print data structures to dbgs(). - void dump() const; - /// getOrCreateAbstractScope - Find or create an abstract lexical scope. LexicalScope *getOrCreateAbstractScope(const DILocalScope *Scope); diff --git a/llvm/include/llvm/CodeGen/Passes.h b/llvm/include/llvm/CodeGen/Passes.h index e33e62d..e3aa32b 100644 --- a/llvm/include/llvm/CodeGen/Passes.h +++ b/llvm/include/llvm/CodeGen/Passes.h @@ -391,10 +391,6 @@ namespace llvm { /// createJumpInstrTables - This pass creates jump-instruction tables. ModulePass *createJumpInstrTablesPass(); - /// createForwardControlFlowIntegrityPass - This pass adds control-flow - /// integrity. - ModulePass *createForwardControlFlowIntegrityPass(); - /// InterleavedAccess Pass - This pass identifies and matches interleaved /// memory accesses to target specific intrinsics. /// diff --git a/llvm/include/llvm/CodeGen/RDFRegisters.h b/llvm/include/llvm/CodeGen/RDFRegisters.h index 98b9203..c49b488 100644 --- a/llvm/include/llvm/CodeGen/RDFRegisters.h +++ b/llvm/include/llvm/CodeGen/RDFRegisters.h @@ -115,12 +115,6 @@ namespace rdf { return RegMasks.get(Register::stackSlot2Index(R)); } - LLVM_ATTRIBUTE_DEPRECATED(RegisterRef normalize(RegisterRef RR), - "This function is now an identity function"); - RegisterRef normalize(RegisterRef RR) const { - return RR; - } - bool alias(RegisterRef RA, RegisterRef RB) const { if (!isRegMaskId(RA.Reg)) return !isRegMaskId(RB.Reg) ? aliasRR(RA, RB) : aliasRM(RA, RB); diff --git a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h b/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h index b38cd49..bd63dd8 100644 --- a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h +++ b/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h @@ -107,7 +107,6 @@ namespace llvm { /// InitNumRegDefsLeft - Determine the # of regs defined by this node. /// void initNumRegDefsLeft(SUnit *SU); - void updateNumRegDefsLeft(SUnit *SU); int regPressureDelta(SUnit *SU, bool RawPressure = false); int rawRegPressureDelta (SUnit *SU, unsigned RCId); diff --git a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h index d2b9520..8a03875 100644 --- a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h +++ b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h @@ -367,16 +367,6 @@ namespace llvm { void addVRegDefDeps(SUnit *SU, unsigned OperIdx); void addVRegUseDeps(SUnit *SU, unsigned OperIdx); - /// Initializes register live-range state for updating kills. - /// PostRA helper for rewriting kill flags. - void startBlockForKills(MachineBasicBlock *BB); - - /// Toggles a register operand kill flag. - /// - /// Other adjustments may be made to the instruction if necessary. Return - /// true if the operand has been deleted, false if not. - void toggleKillFlag(MachineInstr &MI, MachineOperand &MO); - /// Returns a mask for which lanes get read/written by the given (register) /// machine operand. LaneBitmask getLaneMaskForMO(const MachineOperand &MO) const; diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h index cbd2e8b..d454c4e 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -721,9 +721,7 @@ public: // When generating a branch to a BB, we don't in general know enough // to provide debug info for the BB at that time, so keep this one around. SDValue getBasicBlock(MachineBasicBlock *MBB); - SDValue getBasicBlock(MachineBasicBlock *MBB, SDLoc dl); SDValue getExternalSymbol(const char *Sym, EVT VT); - SDValue getExternalSymbol(const char *Sym, const SDLoc &dl, EVT VT); SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned TargetFlags = 0); SDValue getMCSymbol(MCSymbol *Sym, EVT VT); @@ -1456,8 +1454,6 @@ public: EVT VT2, ArrayRef Ops); SDNode *SelectNodeTo(SDNode *N, unsigned MachineOpc, EVT VT1, EVT VT2, EVT VT3, ArrayRef Ops); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, SDValue Op1); SDNode *SelectNodeTo(SDNode *N, unsigned MachineOpc, EVT VT1, EVT VT2, SDValue Op1, SDValue Op2); SDNode *SelectNodeTo(SDNode *N, unsigned MachineOpc, SDVTList VTs, diff --git a/llvm/include/llvm/Support/YAMLParser.h b/llvm/include/llvm/Support/YAMLParser.h index 7baf69e..6e98de0 100644 --- a/llvm/include/llvm/Support/YAMLParser.h +++ b/llvm/include/llvm/Support/YAMLParser.h @@ -510,7 +510,6 @@ public: : Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {} StringRef getName() const { return Name; } - Node *getTarget(); static bool classof(const Node *N) { return N->getType() == NK_Alias; } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 7a9898a..eb8f201 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -806,7 +806,6 @@ public: bool tuneForSCE() const { return DebuggerTuning == DebuggerKind::SCE; } /// @} - void addSectionLabel(const MCSymbol *Sym); const MCSymbol *getSectionLabel(const MCSection *S); void insertSectionLabel(const MCSymbol *S); -- 2.7.4