OLD | NEW |
1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) implementation -----===// | 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) implementation -----===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements the CfgNode class, including the complexities | 10 // This file implements the CfgNode class, including the complexities |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 Ostream &Str = Func->getContext()->getStrDump(); | 488 Ostream &Str = Func->getContext()->getStrDump(); |
489 Liveness *Liveness = Func->getLiveness(); | 489 Liveness *Liveness = Func->getLiveness(); |
490 if (Func->getContext()->isVerbose(IceV_Instructions)) { | 490 if (Func->getContext()->isVerbose(IceV_Instructions)) { |
491 Str << getName() << ":\n"; | 491 Str << getName() << ":\n"; |
492 } | 492 } |
493 // Dump list of predecessor nodes. | 493 // Dump list of predecessor nodes. |
494 if (Func->getContext()->isVerbose(IceV_Preds) && !InEdges.empty()) { | 494 if (Func->getContext()->isVerbose(IceV_Preds) && !InEdges.empty()) { |
495 Str << " // preds = "; | 495 Str << " // preds = "; |
496 bool First = true; | 496 bool First = true; |
497 for (CfgNode *I : InEdges) { | 497 for (CfgNode *I : InEdges) { |
498 if (First) | 498 if (!First) |
499 Str << ", "; | 499 Str << ", "; |
500 First = false; | 500 First = false; |
501 Str << "%" << I->getName(); | 501 Str << "%" << I->getName(); |
502 } | 502 } |
503 Str << "\n"; | 503 Str << "\n"; |
504 } | 504 } |
505 // Dump the live-in variables. | 505 // Dump the live-in variables. |
506 llvm::BitVector LiveIn; | 506 llvm::BitVector LiveIn; |
507 if (Liveness) | 507 if (Liveness) |
508 LiveIn = Liveness->getLiveIn(this); | 508 LiveIn = Liveness->getLiveIn(this); |
(...skipping 24 matching lines...) Expand all Loading... |
533 Str << " %" << Liveness->getVariable(i, this)->getName(); | 533 Str << " %" << Liveness->getVariable(i, this)->getName(); |
534 } | 534 } |
535 } | 535 } |
536 Str << "\n"; | 536 Str << "\n"; |
537 } | 537 } |
538 // Dump list of successor nodes. | 538 // Dump list of successor nodes. |
539 if (Func->getContext()->isVerbose(IceV_Succs)) { | 539 if (Func->getContext()->isVerbose(IceV_Succs)) { |
540 Str << " // succs = "; | 540 Str << " // succs = "; |
541 bool First = true; | 541 bool First = true; |
542 for (CfgNode *I : OutEdges) { | 542 for (CfgNode *I : OutEdges) { |
543 if (First) | 543 if (!First) |
544 Str << ", "; | 544 Str << ", "; |
545 First = false; | 545 First = false; |
546 Str << "%" << I->getName(); | 546 Str << "%" << I->getName(); |
547 } | 547 } |
548 Str << "\n"; | 548 Str << "\n"; |
549 } | 549 } |
550 } | 550 } |
551 | 551 |
552 } // end of namespace Ice | 552 } // end of namespace Ice |
OLD | NEW |