Bug 1338071: IonMonkey - Enable spewing graph mid-compilation, r=jandem

This commit is contained in:
Hannes Verschore 2017-02-09 11:33:05 +01:00
parent f717145420
commit 050810a922
2 changed files with 17 additions and 11 deletions

View File

@ -137,9 +137,11 @@ C1Spewer::spewPass(GenericPrinter& out, MBasicBlock* block)
out.printf("\n"); out.printf("\n");
out.printf(" successors"); out.printf(" successors");
for (uint32_t i = 0; i < block->numSuccessors(); i++) { if (block->hasLastIns()) {
MBasicBlock* successor = block->getSuccessor(i); for (uint32_t i = 0; i < block->numSuccessors(); i++) {
out.printf(" \"B%d\"", successor->id()); MBasicBlock* successor = block->getSuccessor(i);
out.printf(" \"B%d\"", successor->id());
}
} }
out.printf("\n"); out.printf("\n");

View File

@ -144,12 +144,14 @@ JSONSpewer::spewMIR(MIRGraph* mir)
integerProperty("count", block->getHitCount()); integerProperty("count", block->getHitCount());
beginListProperty("attributes"); beginListProperty("attributes");
if (block->isLoopBackedge()) if (block->hasLastIns()) {
stringValue("backedge"); if (block->isLoopBackedge())
if (block->isLoopHeader()) stringValue("backedge");
stringValue("loopheader"); if (block->isLoopHeader())
if (block->isSplitEdge()) stringValue("loopheader");
stringValue("splitedge"); if (block->isSplitEdge())
stringValue("splitedge");
}
endList(); endList();
beginListProperty("predecessors"); beginListProperty("predecessors");
@ -158,8 +160,10 @@ JSONSpewer::spewMIR(MIRGraph* mir)
endList(); endList();
beginListProperty("successors"); beginListProperty("successors");
for (size_t i = 0; i < block->numSuccessors(); i++) if (block->hasLastIns()) {
integerValue(block->getSuccessor(i)->id()); for (size_t i = 0; i < block->numSuccessors(); i++)
integerValue(block->getSuccessor(i)->id());
}
endList(); endList();
beginListProperty("instructions"); beginListProperty("instructions");