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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 } | 852 } |
853 | 853 |
854 } // end of anonymous namespace | 854 } // end of anonymous namespace |
855 | 855 |
856 void CfgNode::emit(Cfg *Func) const { | 856 void CfgNode::emit(Cfg *Func) const { |
857 if (!ALLOW_DUMP) | 857 if (!ALLOW_DUMP) |
858 return; | 858 return; |
859 Func->setCurrentNode(this); | 859 Func->setCurrentNode(this); |
860 Ostream &Str = Func->getContext()->getStrEmit(); | 860 Ostream &Str = Func->getContext()->getStrEmit(); |
861 Liveness *Liveness = Func->getLiveness(); | 861 Liveness *Liveness = Func->getLiveness(); |
862 bool DecorateAsm = Liveness && Func->getContext()->getFlags().DecorateAsm; | 862 bool DecorateAsm = |
| 863 Liveness && Func->getContext()->getFlags().getDecorateAsm(); |
863 Str << getAsmName() << ":\n"; | 864 Str << getAsmName() << ":\n"; |
864 std::vector<SizeT> LiveRegCount(Func->getTarget()->getNumRegisters()); | 865 std::vector<SizeT> LiveRegCount(Func->getTarget()->getNumRegisters()); |
865 if (DecorateAsm) | 866 if (DecorateAsm) |
866 emitRegisterUsage(Str, Func, this, true, LiveRegCount); | 867 emitRegisterUsage(Str, Func, this, true, LiveRegCount); |
867 | 868 |
868 for (const Inst &I : Phis) { | 869 for (const Inst &I : Phis) { |
869 if (I.isDeleted()) | 870 if (I.isDeleted()) |
870 continue; | 871 continue; |
871 // Emitting a Phi instruction should cause an error. | 872 // Emitting a Phi instruction should cause an error. |
872 I.emit(Func); | 873 I.emit(Func); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
984 if (!First) | 985 if (!First) |
985 Str << ", "; | 986 Str << ", "; |
986 First = false; | 987 First = false; |
987 Str << "%" << I->getName(); | 988 Str << "%" << I->getName(); |
988 } | 989 } |
989 Str << "\n"; | 990 Str << "\n"; |
990 } | 991 } |
991 } | 992 } |
992 | 993 |
993 } // end of namespace Ice | 994 } // end of namespace Ice |
OLD | NEW |