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(" successors");
for (uint32_t i = 0; i < block->numSuccessors(); i++) {
MBasicBlock* successor = block->getSuccessor(i);
out.printf(" \"B%d\"", successor->id());
if (block->hasLastIns()) {
for (uint32_t i = 0; i < block->numSuccessors(); i++) {
MBasicBlock* successor = block->getSuccessor(i);
out.printf(" \"B%d\"", successor->id());
}
}
out.printf("\n");

View File

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