Use early returns.

llvm-svn: 82554
This commit is contained in:
David Goodwin 2009-09-22 16:47:52 +00:00
parent 595fbf539a
commit a5762a1955

View File

@ -83,7 +83,9 @@ void ExactHazardRecognizer::dumpScoreboard() {
}
ExactHazardRecognizer::HazardType ExactHazardRecognizer::getHazardType(SUnit *SU) {
if (!ItinData.isEmpty()) {
if (ItinData.isEmpty())
return NoHazard;
unsigned cycle = 0;
// Use the itinerary for the underlying instruction to check for
@ -111,13 +113,14 @@ ExactHazardRecognizer::HazardType ExactHazardRecognizer::getHazardType(SUnit *SU
// Advance the cycle to the next stage.
cycle += IS->getNextCycles();
}
}
return NoHazard;
}
void ExactHazardRecognizer::EmitInstruction(SUnit *SU) {
if (!ItinData.isEmpty()) {
if (ItinData.isEmpty())
return;
unsigned cycle = 0;
// Use the itinerary for the underlying instruction to reserve FU's
@ -152,7 +155,6 @@ void ExactHazardRecognizer::EmitInstruction(SUnit *SU) {
DEBUG(dumpScoreboard());
}
}
void ExactHazardRecognizer::AdvanceCycle() {
Scoreboard[ScoreboardHead] = 0;