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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 if (IsLiveIn) | 802 if (IsLiveIn) |
803 ++LiveRegCount[Var->getRegNum()]; | 803 ++LiveRegCount[Var->getRegNum()]; |
804 LiveRegs.push_back(Var); | 804 LiveRegs.push_back(Var); |
805 } | 805 } |
806 } | 806 } |
807 } | 807 } |
808 // Sort the variables by regnum so they are always printed in a | 808 // Sort the variables by regnum so they are always printed in a |
809 // familiar order. | 809 // familiar order. |
810 std::sort(LiveRegs.begin(), LiveRegs.end(), | 810 std::sort(LiveRegs.begin(), LiveRegs.end(), |
811 [](const Variable *V1, const Variable *V2) { | 811 [](const Variable *V1, const Variable *V2) { |
812 return V1->getRegNum() < V2->getRegNum(); | 812 return V1->getRegNum() < V2->getRegNum(); |
813 }); | 813 }); |
814 bool First = true; | 814 bool First = true; |
815 for (Variable *Var : LiveRegs) { | 815 for (Variable *Var : LiveRegs) { |
816 if (!First) | 816 if (!First) |
817 Str << ","; | 817 Str << ","; |
818 First = false; | 818 First = false; |
819 Var->emit(Func); | 819 Var->emit(Func); |
820 } | 820 } |
821 } | 821 } |
822 Str << "\n"; | 822 Str << "\n"; |
823 } | 823 } |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1237 if (!First) | 1237 if (!First) |
1238 Str << ", "; | 1238 Str << ", "; |
1239 First = false; | 1239 First = false; |
1240 Str << "%" << I->getName(); | 1240 Str << "%" << I->getName(); |
1241 } | 1241 } |
1242 Str << "\n"; | 1242 Str << "\n"; |
1243 } | 1243 } |
1244 } | 1244 } |
1245 | 1245 |
1246 } // end of namespace Ice | 1246 } // end of namespace Ice |
OLD | NEW |