OLD | NEW |
1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// | 1 //===- subzero/src/IceCfg.cpp - Control flow graph 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 /// \file | 10 /// \file |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 } | 795 } |
796 resetCurrentNode(); | 796 resetCurrentNode(); |
797 if (isVerbose(IceV_Liveness)) { | 797 if (isVerbose(IceV_Liveness)) { |
798 // Print summary info about variables | 798 // Print summary info about variables |
799 for (Variable *Var : Variables) { | 799 for (Variable *Var : Variables) { |
800 Str << "// multiblock="; | 800 Str << "// multiblock="; |
801 if (getVMetadata()->isTracked(Var)) | 801 if (getVMetadata()->isTracked(Var)) |
802 Str << getVMetadata()->isMultiBlock(Var); | 802 Str << getVMetadata()->isMultiBlock(Var); |
803 else | 803 else |
804 Str << "?"; | 804 Str << "?"; |
| 805 Str << " defs="; |
| 806 bool FirstPrint = true; |
| 807 if (VMetadata->getKind() != VMK_Uses) { |
| 808 if (const Inst *FirstDef = VMetadata->getFirstDefinition(Var)) { |
| 809 Str << FirstDef->getNumber(); |
| 810 FirstPrint = false; |
| 811 } |
| 812 } |
| 813 if (VMetadata->getKind() == VMK_All) { |
| 814 for (const Inst *Instr : VMetadata->getLatterDefinitions(Var)) { |
| 815 if (!FirstPrint) |
| 816 Str << ","; |
| 817 Str << Instr->getNumber(); |
| 818 FirstPrint = false; |
| 819 } |
| 820 } |
805 Str << " weight=" << Var->getWeight(this) << " "; | 821 Str << " weight=" << Var->getWeight(this) << " "; |
806 Var->dump(this); | 822 Var->dump(this); |
807 Str << " LIVE=" << Var->getLiveRange() << "\n"; | 823 Str << " LIVE=" << Var->getLiveRange() << "\n"; |
808 } | 824 } |
809 } | 825 } |
810 // Print each basic block | 826 // Print each basic block |
811 for (CfgNode *Node : Nodes) | 827 for (CfgNode *Node : Nodes) |
812 Node->dump(this); | 828 Node->dump(this); |
813 if (isVerbose(IceV_Instructions)) | 829 if (isVerbose(IceV_Instructions)) |
814 Str << "}\n"; | 830 Str << "}\n"; |
815 } | 831 } |
816 | 832 |
817 } // end of namespace Ice | 833 } // end of namespace Ice |
OLD | NEW |