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 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1955 void LPointerMap::PrintTo(StringStream* stream) const { | 1929 void LPointerMap::PrintTo(StringStream* stream) const { |
1956 stream->Add("{"); | 1930 stream->Add("{"); |
1957 for (int i = 0; i < pointer_operands_.length(); ++i) { | 1931 for (int i = 0; i < pointer_operands_.length(); ++i) { |
1958 if (i != 0) stream->Add(";"); | 1932 if (i != 0) stream->Add(";"); |
1959 pointer_operands_[i]->PrintTo(stream); | 1933 pointer_operands_[i]->PrintTo(stream); |
1960 } | 1934 } |
1961 stream->Add("} @%d", position()); | 1935 stream->Add("} @%d", position()); |
1962 } | 1936 } |
1963 | 1937 |
1964 } } // namespace v8::internal | 1938 } } // namespace v8::internal |
OLD | NEW |