From 2b7707c07e47f6fd83c6e9fad1ca0bbb4197ada6 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 2 Feb 2015 22:28:48 +0000 Subject: [PATCH] Remove dead code in the HexagonMCInst classes. This also fixes a layering violation in the port and removes calls to getSubtargetImpl. llvm-svn: 227880 --- llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp | 12 ------------ llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp index 60af87c..30da7d1 100644 --- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp +++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp @@ -11,7 +11,6 @@ // //===----------------------------------------------------------------------===// -#include "HexagonInstrInfo.h" #include "MCTargetDesc/HexagonBaseInfo.h" #include "MCTargetDesc/HexagonMCInst.h" #include "MCTargetDesc/HexagonMCTargetDesc.h" @@ -66,17 +65,6 @@ void HexagonMCInst::resetPacket() { setPacketEnd(false); } -// Return the slots used by the insn. -unsigned HexagonMCInst::getUnits(const HexagonTargetMachine *TM) const { - const HexagonInstrInfo *QII = TM->getSubtargetImpl()->getInstrInfo(); - const InstrItineraryData *II = - TM->getSubtargetImpl()->getInstrItineraryData(); - const InstrStage *IS = - II->beginStage(QII->get(this->getOpcode()).getSchedClass()); - - return (IS->getUnits()); -} - MCInstrDesc const &HexagonMCInst::getDesc() const { return (MCII->get(getOpcode())); } diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h index ce9a8db..5c9a5bd 100644 --- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h +++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h @@ -50,9 +50,6 @@ public: static const size_t packetEndIndex = 1; void resetPacket(); - // Return the slots used by the insn. - unsigned getUnits(const HexagonTargetMachine *TM) const; - // Return the Hexagon ISA class for the insn. unsigned getType() const; -- 2.7.4