Remove dead code in the HexagonMCInst classes. This also fixes
authorEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 22:28:48 +0000 (22:28 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 22:28:48 +0000 (22:28 +0000)
a layering violation in the port and removes calls to getSubtargetImpl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227880 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h

index 60af87ce2eed6ea109a8fdfc39dc276073b15d2d..30da7d1b02f7d06419a0659638bbbbec09a15793 100644 (file)
@@ -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()));
 }
index ce9a8db5ac44651bbd0a2f50e97466f92f91aa17..5c9a5bd86d4fe0c28f0d8a89539bb772f0c24106 100644 (file)
@@ -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;