Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 1 | //===----- ScoreboardHazardRecognizer.cpp - Scheduler Support -------------===// |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 10 | // This file implements the ScoreboardHazardRecognizer class, which |
| 11 | // encapsultes hazard-avoidance heuristics for scheduling, based on the |
| 12 | // scheduling itineraries specified for the target. |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 16 | #include "llvm/CodeGen/ScoreboardHazardRecognizer.h" |
Evan Cheng | 078f4ce | 2010-06-14 21:06:53 +0000 | [diff] [blame] | 17 | #include "llvm/CodeGen/ScheduleDAG.h" |
Evan Cheng | 8264e27 | 2011-06-29 01:14:12 +0000 | [diff] [blame] | 18 | #include "llvm/MC/MCInstrItineraries.h" |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 19 | #include "llvm/Support/Debug.h" |
| 20 | #include "llvm/Support/ErrorHandling.h" |
David Goodwin | f20236a | 2009-08-11 01:44:26 +0000 | [diff] [blame] | 21 | #include "llvm/Support/raw_ostream.h" |
Andrew Trick | 47ff14b | 2011-01-21 05:51:33 +0000 | [diff] [blame] | 22 | #include "llvm/Target/TargetInstrInfo.h" |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 23 | |
Bill Wendling | a2c4594 | 2009-08-22 20:08:44 +0000 | [diff] [blame] | 24 | using namespace llvm; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 25 | |
Mehdi Amini | ea0b1e7 | 2016-04-20 00:21:24 +0000 | [diff] [blame] | 26 | #define DEBUG_TYPE DebugType |
Chandler Carruth | 1b9dde0 | 2014-04-22 02:02:50 +0000 | [diff] [blame] | 27 | |
Mehdi Amini | ea0b1e7 | 2016-04-20 00:21:24 +0000 | [diff] [blame] | 28 | ScoreboardHazardRecognizer::ScoreboardHazardRecognizer( |
| 29 | const InstrItineraryData *II, const ScheduleDAG *SchedDAG, |
| 30 | const char *ParentDebugType) |
| 31 | : ScheduleHazardRecognizer(), DebugType(ParentDebugType), ItinData(II), |
| 32 | DAG(SchedDAG), IssueWidth(0), IssueCount(0) { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 33 | |
Andrew Trick | ed7c96d | 2012-06-05 03:44:32 +0000 | [diff] [blame] | 34 | // Determine the maximum depth of any itinerary. This determines the depth of |
| 35 | // the scoreboard. We always make the scoreboard at least 1 cycle deep to |
| 36 | // avoid dealing with the boundary condition. |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 37 | unsigned ScoreboardDepth = 1; |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 38 | if (ItinData && !ItinData->isEmpty()) { |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 39 | for (unsigned idx = 0; ; ++idx) { |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 40 | if (ItinData->isEndMarker(idx)) |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 41 | break; |
| 42 | |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 43 | const InstrStage *IS = ItinData->beginStage(idx); |
| 44 | const InstrStage *E = ItinData->endStage(idx); |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 45 | unsigned CurCycle = 0; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 46 | unsigned ItinDepth = 0; |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 47 | for (; IS != E; ++IS) { |
| 48 | unsigned StageDepth = CurCycle + IS->getCycles(); |
| 49 | if (ItinDepth < StageDepth) ItinDepth = StageDepth; |
| 50 | CurCycle += IS->getNextCycles(); |
| 51 | } |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 52 | |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 53 | // Find the next power-of-2 >= ItinDepth |
| 54 | while (ItinDepth > ScoreboardDepth) { |
| 55 | ScoreboardDepth *= 2; |
Andrew Trick | ed7c96d | 2012-06-05 03:44:32 +0000 | [diff] [blame] | 56 | // Don't set MaxLookAhead until we find at least one nonzero stage. |
| 57 | // This way, an itinerary with no stages has MaxLookAhead==0, which |
| 58 | // completely bypasses the scoreboard hazard logic. |
| 59 | MaxLookAhead = ScoreboardDepth; |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 60 | } |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 61 | } |
| 62 | } |
| 63 | |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 64 | ReservedScoreboard.reset(ScoreboardDepth); |
| 65 | RequiredScoreboard.reset(ScoreboardDepth); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 66 | |
Andrew Trick | 87255e3 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 67 | // If MaxLookAhead is not set above, then we are not enabled. |
Andrew Trick | 73d7736 | 2012-06-05 03:44:40 +0000 | [diff] [blame] | 68 | if (!isEnabled()) |
Andrew Trick | ed7c96d | 2012-06-05 03:44:32 +0000 | [diff] [blame] | 69 | DEBUG(dbgs() << "Disabled scoreboard hazard recognizer\n"); |
Andrew Trick | 73d7736 | 2012-06-05 03:44:40 +0000 | [diff] [blame] | 70 | else { |
Andrew Trick | 87255e3 | 2012-07-07 04:00:00 +0000 | [diff] [blame] | 71 | // A nonempty itinerary must have a SchedModel. |
Pete Cooper | 1175945 | 2014-09-02 17:43:54 +0000 | [diff] [blame] | 72 | IssueWidth = ItinData->SchedModel.IssueWidth; |
Andrew Trick | ed7c96d | 2012-06-05 03:44:32 +0000 | [diff] [blame] | 73 | DEBUG(dbgs() << "Using scoreboard hazard recognizer: Depth = " |
| 74 | << ScoreboardDepth << '\n'); |
Andrew Trick | 73d7736 | 2012-06-05 03:44:40 +0000 | [diff] [blame] | 75 | } |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 76 | } |
| 77 | |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 78 | void ScoreboardHazardRecognizer::Reset() { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 79 | IssueCount = 0; |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 80 | RequiredScoreboard.reset(); |
| 81 | ReservedScoreboard.reset(); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 82 | } |
| 83 | |
Manman Ren | 19f49ac | 2012-09-11 22:23:19 +0000 | [diff] [blame] | 84 | #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) |
Yaron Keren | eb2a254 | 2016-01-29 20:50:44 +0000 | [diff] [blame] | 85 | LLVM_DUMP_METHOD void ScoreboardHazardRecognizer::Scoreboard::dump() const { |
David Greene | 964a982 | 2010-01-04 21:26:07 +0000 | [diff] [blame] | 86 | dbgs() << "Scoreboard:\n"; |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 87 | |
| 88 | unsigned last = Depth - 1; |
| 89 | while ((last > 0) && ((*this)[last] == 0)) |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 90 | last--; |
| 91 | |
| 92 | for (unsigned i = 0; i <= last; i++) { |
Hal Finkel | 8db5547 | 2012-06-22 20:27:13 +0000 | [diff] [blame] | 93 | unsigned FUs = (*this)[i]; |
David Greene | 964a982 | 2010-01-04 21:26:07 +0000 | [diff] [blame] | 94 | dbgs() << "\t"; |
Hal Finkel | 8db5547 | 2012-06-22 20:27:13 +0000 | [diff] [blame] | 95 | for (int j = 31; j >= 0; j--) |
| 96 | dbgs() << ((FUs & (1 << j)) ? '1' : '0'); |
David Greene | 964a982 | 2010-01-04 21:26:07 +0000 | [diff] [blame] | 97 | dbgs() << '\n'; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 98 | } |
| 99 | } |
Manman Ren | 742534c | 2012-09-06 19:06:06 +0000 | [diff] [blame] | 100 | #endif |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 101 | |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 102 | bool ScoreboardHazardRecognizer::atIssueLimit() const { |
| 103 | if (IssueWidth == 0) |
| 104 | return false; |
| 105 | |
| 106 | return IssueCount == IssueWidth; |
| 107 | } |
| 108 | |
Evan Cheng | f128bdc | 2010-06-16 07:35:02 +0000 | [diff] [blame] | 109 | ScheduleHazardRecognizer::HazardType |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 110 | ScoreboardHazardRecognizer::getHazardType(SUnit *SU, int Stalls) { |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 111 | if (!ItinData || ItinData->isEmpty()) |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 112 | return NoHazard; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 113 | |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 114 | // Note that stalls will be negative for bottom-up scheduling. |
| 115 | int cycle = Stalls; |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 116 | |
| 117 | // Use the itinerary for the underlying instruction to check for |
| 118 | // free FU's in the scoreboard at the appropriate future cycles. |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 119 | |
Evan Cheng | 6cc775f | 2011-06-28 19:10:37 +0000 | [diff] [blame] | 120 | const MCInstrDesc *MCID = DAG->getInstrDesc(SU); |
Craig Topper | c0196b1 | 2014-04-14 00:51:57 +0000 | [diff] [blame] | 121 | if (!MCID) { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 122 | // Don't check hazards for non-machineinstr Nodes. |
| 123 | return NoHazard; |
| 124 | } |
Evan Cheng | 6cc775f | 2011-06-28 19:10:37 +0000 | [diff] [blame] | 125 | unsigned idx = MCID->getSchedClass(); |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 126 | for (const InstrStage *IS = ItinData->beginStage(idx), |
| 127 | *E = ItinData->endStage(idx); IS != E; ++IS) { |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 128 | // We must find one of the stage's units free for every cycle the |
| 129 | // stage is occupied. FIXME it would be more accurate to find the |
| 130 | // same unit free in all the cycles. |
| 131 | for (unsigned int i = 0; i < IS->getCycles(); ++i) { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 132 | int StageCycle = cycle + (int)i; |
| 133 | if (StageCycle < 0) |
| 134 | continue; |
| 135 | |
| 136 | if (StageCycle >= (int)RequiredScoreboard.getDepth()) { |
| 137 | assert((StageCycle - Stalls) < (int)RequiredScoreboard.getDepth() && |
| 138 | "Scoreboard depth exceeded!"); |
| 139 | // This stage was stalled beyond pipeline depth, so cannot conflict. |
| 140 | break; |
| 141 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 142 | |
Hal Finkel | 8db5547 | 2012-06-22 20:27:13 +0000 | [diff] [blame] | 143 | unsigned freeUnits = IS->getUnits(); |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 144 | switch (IS->getReservationKind()) { |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 145 | case InstrStage::Required: |
| 146 | // Required FUs conflict with both reserved and required ones |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 147 | freeUnits &= ~ReservedScoreboard[StageCycle]; |
Justin Bogner | b03fd12 | 2016-08-17 05:10:15 +0000 | [diff] [blame] | 148 | LLVM_FALLTHROUGH; |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 149 | case InstrStage::Reserved: |
| 150 | // Reserved FUs can conflict only with required ones. |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 151 | freeUnits &= ~RequiredScoreboard[StageCycle]; |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 152 | break; |
| 153 | } |
| 154 | |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 155 | if (!freeUnits) { |
Benjamin Kramer | 484f424 | 2012-05-26 11:37:37 +0000 | [diff] [blame] | 156 | DEBUG(dbgs() << "*** Hazard in cycle +" << StageCycle << ", "); |
David Greene | 964a982 | 2010-01-04 21:26:07 +0000 | [diff] [blame] | 157 | DEBUG(dbgs() << "SU(" << SU->NodeNum << "): "); |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 158 | DEBUG(DAG->dumpNode(SU)); |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 159 | return Hazard; |
| 160 | } |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 161 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 162 | |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 163 | // Advance the cycle to the next stage. |
| 164 | cycle += IS->getNextCycles(); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | return NoHazard; |
| 168 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 169 | |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 170 | void ScoreboardHazardRecognizer::EmitInstruction(SUnit *SU) { |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 171 | if (!ItinData || ItinData->isEmpty()) |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 172 | return; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 173 | |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 174 | // Use the itinerary for the underlying instruction to reserve FU's |
| 175 | // in the scoreboard at the appropriate future cycles. |
Evan Cheng | 6cc775f | 2011-06-28 19:10:37 +0000 | [diff] [blame] | 176 | const MCInstrDesc *MCID = DAG->getInstrDesc(SU); |
| 177 | assert(MCID && "The scheduler must filter non-machineinstrs"); |
| 178 | if (DAG->TII->isZeroCost(MCID->Opcode)) |
Andrew Trick | 47ff14b | 2011-01-21 05:51:33 +0000 | [diff] [blame] | 179 | return; |
| 180 | |
| 181 | ++IssueCount; |
| 182 | |
| 183 | unsigned cycle = 0; |
| 184 | |
Evan Cheng | 6cc775f | 2011-06-28 19:10:37 +0000 | [diff] [blame] | 185 | unsigned idx = MCID->getSchedClass(); |
Evan Cheng | bf40707 | 2010-09-10 01:29:16 +0000 | [diff] [blame] | 186 | for (const InstrStage *IS = ItinData->beginStage(idx), |
| 187 | *E = ItinData->endStage(idx); IS != E; ++IS) { |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 188 | // We must reserve one of the stage's units for every cycle the |
| 189 | // stage is occupied. FIXME it would be more accurate to reserve |
| 190 | // the same unit free in all the cycles. |
| 191 | for (unsigned int i = 0; i < IS->getCycles(); ++i) { |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 192 | assert(((cycle + i) < RequiredScoreboard.getDepth()) && |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 193 | "Scoreboard depth exceeded!"); |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 194 | |
Hal Finkel | 8db5547 | 2012-06-22 20:27:13 +0000 | [diff] [blame] | 195 | unsigned freeUnits = IS->getUnits(); |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 196 | switch (IS->getReservationKind()) { |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 197 | case InstrStage::Required: |
| 198 | // Required FUs conflict with both reserved and required ones |
| 199 | freeUnits &= ~ReservedScoreboard[cycle + i]; |
Justin Bogner | b03fd12 | 2016-08-17 05:10:15 +0000 | [diff] [blame] | 200 | LLVM_FALLTHROUGH; |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 201 | case InstrStage::Reserved: |
| 202 | // Reserved FUs can conflict only with required ones. |
| 203 | freeUnits &= ~RequiredScoreboard[cycle + i]; |
| 204 | break; |
| 205 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 206 | |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 207 | // reduce to a single unit |
Hal Finkel | 8db5547 | 2012-06-22 20:27:13 +0000 | [diff] [blame] | 208 | unsigned freeUnit = 0; |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 209 | do { |
| 210 | freeUnit = freeUnits; |
| 211 | freeUnits = freeUnit & (freeUnit - 1); |
| 212 | } while (freeUnits); |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 213 | |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 214 | if (IS->getReservationKind() == InstrStage::Required) |
| 215 | RequiredScoreboard[cycle + i] |= freeUnit; |
| 216 | else |
| 217 | ReservedScoreboard[cycle + i] |= freeUnit; |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 218 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 219 | |
David Goodwin | 74b7956 | 2009-09-22 16:47:52 +0000 | [diff] [blame] | 220 | // Advance the cycle to the next stage. |
| 221 | cycle += IS->getNextCycles(); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 222 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 223 | |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 224 | DEBUG(ReservedScoreboard.dump()); |
| 225 | DEBUG(RequiredScoreboard.dump()); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 226 | } |
Anton Korobeynikov | 9a348a9 | 2010-04-07 18:19:24 +0000 | [diff] [blame] | 227 | |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 228 | void ScoreboardHazardRecognizer::AdvanceCycle() { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 229 | IssueCount = 0; |
Anton Korobeynikov | 0bdc634 | 2010-04-07 18:19:32 +0000 | [diff] [blame] | 230 | ReservedScoreboard[0] = 0; ReservedScoreboard.advance(); |
| 231 | RequiredScoreboard[0] = 0; RequiredScoreboard.advance(); |
David Goodwin | 6021b4d | 2009-08-10 15:55:25 +0000 | [diff] [blame] | 232 | } |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 233 | |
| 234 | void ScoreboardHazardRecognizer::RecedeCycle() { |
Andrew Trick | 10ffc2b | 2010-12-24 05:03:26 +0000 | [diff] [blame] | 235 | IssueCount = 0; |
Andrew Trick | 00067fb | 2010-12-08 20:04:29 +0000 | [diff] [blame] | 236 | ReservedScoreboard[ReservedScoreboard.getDepth()-1] = 0; |
| 237 | ReservedScoreboard.recede(); |
| 238 | RequiredScoreboard[RequiredScoreboard.getDepth()-1] = 0; |
| 239 | RequiredScoreboard.recede(); |
| 240 | } |