diff options
author | Hal Finkel <hfinkel@anl.gov> | 2012-06-22 20:27:13 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2012-06-22 20:27:13 +0000 |
commit | b460a3382961c5be9952a75d46228f624edbd39f (patch) | |
tree | e501b3464668764da5a5e507d86d4b500bfd41ef | |
parent | c90a1fcf9f44858b20e0f5f7e0b98049aec7a1e0 (diff) |
Revert r158679 - use case is unclear (and it increases the memory footprint).
Original commit message:
Allow up to 64 functional units per processor itinerary.
This patch changes the type used to hold the FU bitset from unsigned to uint64_t.
This will be needed for some upcoming PowerPC itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159027 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/DFAPacketizer.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/ScoreboardHazardRecognizer.h | 6 | ||||
-rw-r--r-- | include/llvm/MC/MCInstrItineraries.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/DFAPacketizer.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/ScoreboardHazardRecognizer.cpp | 12 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUNopFiller.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Hexagon/HexagonVLIWPacketizer.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 4 |
8 files changed, 18 insertions, 18 deletions
diff --git a/include/llvm/CodeGen/DFAPacketizer.h b/include/llvm/CodeGen/DFAPacketizer.h index d9a48b6328..2d2db78144 100644 --- a/include/llvm/CodeGen/DFAPacketizer.h +++ b/include/llvm/CodeGen/DFAPacketizer.h @@ -42,7 +42,7 @@ class SUnit; class DFAPacketizer { private: - typedef std::pair<unsigned, uint64_t> UnsignPair; + typedef std::pair<unsigned, unsigned> UnsignPair; const InstrItineraryData *InstrItins; int CurrentState; const int (*DFAStateInputTable)[2]; diff --git a/include/llvm/CodeGen/ScoreboardHazardRecognizer.h b/include/llvm/CodeGen/ScoreboardHazardRecognizer.h index c741e1ba24..060e89a3fd 100644 --- a/include/llvm/CodeGen/ScoreboardHazardRecognizer.h +++ b/include/llvm/CodeGen/ScoreboardHazardRecognizer.h @@ -39,7 +39,7 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { // bottom-up scheduler, then the scoreboard cycles are the inverse of the // scheduler's cycles. class Scoreboard { - uint64_t *Data; + unsigned *Data; // The maximum number of cycles monitored by the Scoreboard. This // value is determined based on the target itineraries to ensure @@ -54,7 +54,7 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { } size_t getDepth() const { return Depth; } - uint64_t& operator[](size_t idx) const { + unsigned& operator[](size_t idx) const { // Depth is expected to be a power-of-2. assert(Depth && !(Depth & (Depth - 1)) && "Scoreboard was not initialized properly!"); @@ -65,7 +65,7 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { void reset(size_t d = 1) { if (Data == NULL) { Depth = d; - Data = new uint64_t[Depth]; + Data = new unsigned[Depth]; } memset(Data, 0, Depth * sizeof(Data[0])); diff --git a/include/llvm/MC/MCInstrItineraries.h b/include/llvm/MC/MCInstrItineraries.h index e6178a2d61..05baddd918 100644 --- a/include/llvm/MC/MCInstrItineraries.h +++ b/include/llvm/MC/MCInstrItineraries.h @@ -62,7 +62,7 @@ struct InstrStage { }; unsigned Cycles_; ///< Length of stage in machine cycles - uint64_t Units_; ///< Choice of functional units + unsigned Units_; ///< Choice of functional units int NextCycles_; ///< Number of machine cycles to next stage ReservationKinds Kind_; ///< Kind of the FU reservation @@ -72,7 +72,7 @@ struct InstrStage { } /// getUnits - returns the choice of FUs - uint64_t getUnits() const { + unsigned getUnits() const { return Units_; } diff --git a/lib/CodeGen/DFAPacketizer.cpp b/lib/CodeGen/DFAPacketizer.cpp index d4775775c0..ff2f11353a 100644 --- a/lib/CodeGen/DFAPacketizer.cpp +++ b/lib/CodeGen/DFAPacketizer.cpp @@ -66,7 +66,7 @@ void DFAPacketizer::ReadTable(unsigned int state) { bool DFAPacketizer::canReserveResources(const llvm::MCInstrDesc *MID) { unsigned InsnClass = MID->getSchedClass(); const llvm::InstrStage *IS = InstrItins->beginStage(InsnClass); - uint64_t FuncUnits = IS->getUnits(); + unsigned FuncUnits = IS->getUnits(); UnsignPair StateTrans = UnsignPair(CurrentState, FuncUnits); ReadTable(CurrentState); return (CachedTable.count(StateTrans) != 0); @@ -78,7 +78,7 @@ bool DFAPacketizer::canReserveResources(const llvm::MCInstrDesc *MID) { void DFAPacketizer::reserveResources(const llvm::MCInstrDesc *MID) { unsigned InsnClass = MID->getSchedClass(); const llvm::InstrStage *IS = InstrItins->beginStage(InsnClass); - uint64_t FuncUnits = IS->getUnits(); + unsigned FuncUnits = IS->getUnits(); UnsignPair StateTrans = UnsignPair(CurrentState, FuncUnits); ReadTable(CurrentState); assert(CachedTable.count(StateTrans) != 0); diff --git a/lib/CodeGen/ScoreboardHazardRecognizer.cpp b/lib/CodeGen/ScoreboardHazardRecognizer.cpp index ed5e4a3fec..7110b7566a 100644 --- a/lib/CodeGen/ScoreboardHazardRecognizer.cpp +++ b/lib/CodeGen/ScoreboardHazardRecognizer.cpp @@ -95,10 +95,10 @@ void ScoreboardHazardRecognizer::Scoreboard::dump() const { last--; for (unsigned i = 0; i <= last; i++) { - uint64_t FUs = (*this)[i]; + unsigned FUs = (*this)[i]; dbgs() << "\t"; - for (int j = 63; j >= 0; j--) - dbgs() << ((FUs & (1ULL << j)) ? '1' : '0'); + for (int j = 31; j >= 0; j--) + dbgs() << ((FUs & (1 << j)) ? '1' : '0'); dbgs() << '\n'; } } @@ -144,7 +144,7 @@ ScoreboardHazardRecognizer::getHazardType(SUnit *SU, int Stalls) { break; } - uint64_t freeUnits = IS->getUnits(); + unsigned freeUnits = IS->getUnits(); switch (IS->getReservationKind()) { case InstrStage::Required: // Required FUs conflict with both reserved and required ones @@ -196,7 +196,7 @@ void ScoreboardHazardRecognizer::EmitInstruction(SUnit *SU) { assert(((cycle + i) < RequiredScoreboard.getDepth()) && "Scoreboard depth exceeded!"); - uint64_t freeUnits = IS->getUnits(); + unsigned freeUnits = IS->getUnits(); switch (IS->getReservationKind()) { case InstrStage::Required: // Required FUs conflict with both reserved and required ones @@ -209,7 +209,7 @@ void ScoreboardHazardRecognizer::EmitInstruction(SUnit *SU) { } // reduce to a single unit - uint64_t freeUnit = 0; + unsigned freeUnit = 0; do { freeUnit = freeUnits; freeUnits = freeUnit & (freeUnit - 1); diff --git a/lib/Target/CellSPU/SPUNopFiller.cpp b/lib/Target/CellSPU/SPUNopFiller.cpp index 150959777d..7c58041e3b 100644 --- a/lib/Target/CellSPU/SPUNopFiller.cpp +++ b/lib/Target/CellSPU/SPUNopFiller.cpp @@ -138,7 +138,7 @@ SPUNopFiller::SPUOpPlace SPUNopFiller::getOpPlacement( MachineInstr &instr ) { int sc = instr.getDesc().getSchedClass(); const InstrStage *stage = IID->beginStage(sc); - uint64_t FUs = stage->getUnits(); + unsigned FUs = stage->getUnits(); SPUOpPlace retval; switch( FUs ) { diff --git a/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp b/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp index 7f1658d37d..a03ed03365 100644 --- a/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp +++ b/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp @@ -3183,7 +3183,7 @@ bool HexagonPacketizerList::ignorePseudoInstruction(MachineInstr *MI, unsigned SchedClass = TID.getSchedClass(); const InstrStage* IS = ResourceTracker->getInstrItins()->beginStage(SchedClass); - uint64_t FuncUnits = IS->getUnits(); + unsigned FuncUnits = IS->getUnits(); return !FuncUnits; } diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index 19b0550b99..59464d2940 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -379,8 +379,8 @@ void SubtargetEmitter::EmitStageAndOperandCycleData(raw_ostream &OS, << "namespace " << Name << "FU {\n"; for (unsigned j = 0, FUN = FUs.size(); j < FUN; ++j) - OS << " const uint64_t " << FUs[j]->getName() - << " = 1ULL << " << j << ";\n"; + OS << " const unsigned " << FUs[j]->getName() + << " = 1 << " << j << ";\n"; OS << "}\n"; |