OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 void LLabel::PrintDataTo(StringStream* stream) const { | 87 void LLabel::PrintDataTo(StringStream* stream) const { |
88 LGap::PrintDataTo(stream); | 88 LGap::PrintDataTo(stream); |
89 LLabel* rep = replacement(); | 89 LLabel* rep = replacement(); |
90 if (rep != NULL) { | 90 if (rep != NULL) { |
91 stream->Add(" Dead block replaced with B%d", rep->block_id()); | 91 stream->Add(" Dead block replaced with B%d", rep->block_id()); |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 | 95 |
96 bool LParallelMove::IsRedundant() const { | |
97 for (int i = 0; i < move_operands_.length(); ++i) { | |
98 if (!move_operands_[i].IsRedundant()) return false; | |
99 } | |
100 return true; | |
101 } | |
102 | |
103 | |
104 void LParallelMove::PrintDataTo(StringStream* stream) const { | |
105 for (int i = move_operands_.length() - 1; i >= 0; --i) { | |
106 if (!move_operands_[i].IsEliminated()) { | |
107 LOperand* from = move_operands_[i].from(); | |
108 LOperand* to = move_operands_[i].to(); | |
109 if (from->Equals(to)) { | |
110 to->PrintTo(stream); | |
111 } else { | |
112 to->PrintTo(stream); | |
113 stream->Add(" = "); | |
114 from->PrintTo(stream); | |
115 } | |
116 stream->Add("; "); | |
117 } | |
118 } | |
119 } | |
120 | |
121 | |
122 bool LGap::IsRedundant() const { | 96 bool LGap::IsRedundant() const { |
123 for (int i = 0; i < 4; i++) { | 97 for (int i = 0; i < 4; i++) { |
124 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { | 98 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { |
125 return false; | 99 return false; |
126 } | 100 } |
127 } | 101 } |
128 | 102 |
129 return true; | 103 return true; |
130 } | 104 } |
131 | 105 |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 void LPointerMap::PrintTo(StringStream* stream) const { | 1941 void LPointerMap::PrintTo(StringStream* stream) const { |
1968 stream->Add("{"); | 1942 stream->Add("{"); |
1969 for (int i = 0; i < pointer_operands_.length(); ++i) { | 1943 for (int i = 0; i < pointer_operands_.length(); ++i) { |
1970 if (i != 0) stream->Add(";"); | 1944 if (i != 0) stream->Add(";"); |
1971 pointer_operands_[i]->PrintTo(stream); | 1945 pointer_operands_[i]->PrintTo(stream); |
1972 } | 1946 } |
1973 stream->Add("} @%d", position()); | 1947 stream->Add("} @%d", position()); |
1974 } | 1948 } |
1975 | 1949 |
1976 } } // namespace v8::internal | 1950 } } // namespace v8::internal |
OLD | NEW |