mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Don't crash when target has no itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80962 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -83,6 +83,7 @@ void ExactHazardRecognizer::dumpScoreboard() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ExactHazardRecognizer::HazardType ExactHazardRecognizer::getHazardType(SUnit *SU) {
|
ExactHazardRecognizer::HazardType ExactHazardRecognizer::getHazardType(SUnit *SU) {
|
||||||
|
if (!ItinData.isEmpty()) {
|
||||||
unsigned cycle = 0;
|
unsigned cycle = 0;
|
||||||
|
|
||||||
// Use the itinerary for the underlying instruction to check for
|
// Use the itinerary for the underlying instruction to check for
|
||||||
@@ -110,11 +111,13 @@ ExactHazardRecognizer::HazardType ExactHazardRecognizer::getHazardType(SUnit *SU
|
|||||||
// Advance the cycle to the next stage.
|
// Advance the cycle to the next stage.
|
||||||
cycle += IS->getNextCycles();
|
cycle += IS->getNextCycles();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return NoHazard;
|
return NoHazard;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExactHazardRecognizer::EmitInstruction(SUnit *SU) {
|
void ExactHazardRecognizer::EmitInstruction(SUnit *SU) {
|
||||||
|
if (!ItinData.isEmpty()) {
|
||||||
unsigned cycle = 0;
|
unsigned cycle = 0;
|
||||||
|
|
||||||
// Use the itinerary for the underlying instruction to reserve FU's
|
// Use the itinerary for the underlying instruction to reserve FU's
|
||||||
@@ -149,6 +152,7 @@ void ExactHazardRecognizer::EmitInstruction(SUnit *SU) {
|
|||||||
|
|
||||||
DEBUG(dumpScoreboard());
|
DEBUG(dumpScoreboard());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ExactHazardRecognizer::AdvanceCycle() {
|
void ExactHazardRecognizer::AdvanceCycle() {
|
||||||
Scoreboard[ScoreboardHead] = 0;
|
Scoreboard[ScoreboardHead] = 0;
|
||||||
|
Reference in New Issue
Block a user