mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 23:32:27 +00:00
misched: Allow disabling scoreboard hazard checking for subtargets with a
valid itinerary but no pipeline stages. An itinerary can contain useful scheduling information without specifying pipeline stages for each instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157977 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d05b46115f
commit
d327d3dddd
@ -46,6 +46,8 @@ public:
|
|||||||
|
|
||||||
/// atIssueLimit - Return true if no more instructions may be issued in this
|
/// atIssueLimit - Return true if no more instructions may be issued in this
|
||||||
/// cycle.
|
/// cycle.
|
||||||
|
///
|
||||||
|
/// FIXME: remove this once MachineScheduler is the only client.
|
||||||
virtual bool atIssueLimit() const { return false; }
|
virtual bool atIssueLimit() const { return false; }
|
||||||
|
|
||||||
/// getHazardType - Return the hazard type of emitting this node. There are
|
/// getHazardType - Return the hazard type of emitting this node. There are
|
||||||
|
@ -39,9 +39,9 @@ ScoreboardHazardRecognizer(const InstrItineraryData *II,
|
|||||||
DebugType = ParentDebugType;
|
DebugType = ParentDebugType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Determine the maximum depth of any itinerary. This determines the
|
// Determine the maximum depth of any itinerary. This determines the depth of
|
||||||
// depth of the scoreboard. We always make the scoreboard at least 1
|
// the scoreboard. We always make the scoreboard at least 1 cycle deep to
|
||||||
// cycle deep to avoid dealing with the boundary condition.
|
// avoid dealing with the boundary condition.
|
||||||
unsigned ScoreboardDepth = 1;
|
unsigned ScoreboardDepth = 1;
|
||||||
if (ItinData && !ItinData->isEmpty()) {
|
if (ItinData && !ItinData->isEmpty()) {
|
||||||
IssueWidth = ItinData->IssueWidth;
|
IssueWidth = ItinData->IssueWidth;
|
||||||
@ -63,16 +63,22 @@ ScoreboardHazardRecognizer(const InstrItineraryData *II,
|
|||||||
// Find the next power-of-2 >= ItinDepth
|
// Find the next power-of-2 >= ItinDepth
|
||||||
while (ItinDepth > ScoreboardDepth) {
|
while (ItinDepth > ScoreboardDepth) {
|
||||||
ScoreboardDepth *= 2;
|
ScoreboardDepth *= 2;
|
||||||
|
// Don't set MaxLookAhead until we find at least one nonzero stage.
|
||||||
|
// This way, an itinerary with no stages has MaxLookAhead==0, which
|
||||||
|
// completely bypasses the scoreboard hazard logic.
|
||||||
|
MaxLookAhead = ScoreboardDepth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MaxLookAhead = ScoreboardDepth;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReservedScoreboard.reset(ScoreboardDepth);
|
ReservedScoreboard.reset(ScoreboardDepth);
|
||||||
RequiredScoreboard.reset(ScoreboardDepth);
|
RequiredScoreboard.reset(ScoreboardDepth);
|
||||||
|
|
||||||
DEBUG(dbgs() << "Using scoreboard hazard recognizer: Depth = "
|
if (!MaxLookAhead)
|
||||||
<< ScoreboardDepth << '\n');
|
DEBUG(dbgs() << "Disabled scoreboard hazard recognizer\n");
|
||||||
|
else
|
||||||
|
DEBUG(dbgs() << "Using scoreboard hazard recognizer: Depth = "
|
||||||
|
<< ScoreboardDepth << '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreboardHazardRecognizer::Reset() {
|
void ScoreboardHazardRecognizer::Reset() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user