Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Side by Side Diff: src/compiler/gap-resolver.cc

Issue 2758563002: [gn] Enable stricter build flags (Closed)
Patch Set: Fix one last unused variable error Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/base/platform/platform-win32.cc ('k') | src/d8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/gap-resolver.h" 5 #include "src/compiler/gap-resolver.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 10
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 bool is_fp_loc_move = !kSimpleFPAliasing && destination.IsFPLocationOperand(); 151 bool is_fp_loc_move = !kSimpleFPAliasing && destination.IsFPLocationOperand();
152 152
153 // Perform a depth-first traversal of the move graph to resolve dependencies. 153 // Perform a depth-first traversal of the move graph to resolve dependencies.
154 // Any unperformed, unpending move with a source the same as this one's 154 // Any unperformed, unpending move with a source the same as this one's
155 // destination blocks this one so recursively perform all such moves. 155 // destination blocks this one so recursively perform all such moves.
156 for (size_t i = 0; i < moves->size(); ++i) { 156 for (size_t i = 0; i < moves->size(); ++i) {
157 auto other = (*moves)[i]; 157 auto other = (*moves)[i];
158 if (other->IsEliminated()) continue; 158 if (other->IsEliminated()) continue;
159 if (other->IsPending()) continue; 159 if (other->IsPending()) continue;
160 if (other->source().InterferesWith(destination)) { 160 if (other->source().InterferesWith(destination)) {
161 if (!kSimpleFPAliasing && is_fp_loc_move && 161 if (is_fp_loc_move &&
162 LocationOperand::cast(other->source()).representation() > 162 LocationOperand::cast(other->source()).representation() >
163 split_rep_) { 163 split_rep_) {
164 // 'other' must also be an FP location move. Break it into fragments 164 // 'other' must also be an FP location move. Break it into fragments
165 // of the same size as 'move'. 'other' is set to one of the fragments, 165 // of the same size as 'move'. 'other' is set to one of the fragments,
166 // and the rest are appended to 'moves'. 166 // and the rest are appended to 'moves'.
167 other = Split(other, split_rep_, moves); 167 other = Split(other, split_rep_, moves);
168 // 'other' may not block destination now. 168 // 'other' may not block destination now.
169 if (!other->source().InterferesWith(destination)) continue; 169 if (!other->source().InterferesWith(destination)) continue;
170 } 170 }
171 // Though PerformMove can change any source operand in the move graph, 171 // Though PerformMove can change any source operand in the move graph,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 // Ensure source is a register or both are stack slots, to limit swap cases. 208 // Ensure source is a register or both are stack slots, to limit swap cases.
209 if (source.IsStackSlot() || source.IsFPStackSlot()) { 209 if (source.IsStackSlot() || source.IsFPStackSlot()) {
210 std::swap(source, destination); 210 std::swap(source, destination);
211 } 211 }
212 assembler_->AssembleSwap(&source, &destination); 212 assembler_->AssembleSwap(&source, &destination);
213 move->Eliminate(); 213 move->Eliminate();
214 214
215 // Update outstanding moves whose source may now have been moved. 215 // Update outstanding moves whose source may now have been moved.
216 if (!kSimpleFPAliasing && is_fp_loc_move) { 216 if (!kSimpleFPAliasing && is_fp_loc_move) {
Michael Starzinger 2017/03/17 14:38:09 Isn't this predicate also affected?
jgruber 2017/03/17 15:16:09 Done.
217 // We may have to split larger moves. 217 // We may have to split larger moves.
218 for (size_t i = 0; i < moves->size(); ++i) { 218 for (size_t i = 0; i < moves->size(); ++i) {
219 auto other = (*moves)[i]; 219 auto other = (*moves)[i];
220 if (other->IsEliminated()) continue; 220 if (other->IsEliminated()) continue;
221 if (source.InterferesWith(other->source())) { 221 if (source.InterferesWith(other->source())) {
222 if (LocationOperand::cast(other->source()).representation() > 222 if (LocationOperand::cast(other->source()).representation() >
223 split_rep_) { 223 split_rep_) {
224 other = Split(other, split_rep_, moves); 224 other = Split(other, split_rep_, moves);
225 if (!source.InterferesWith(other->source())) continue; 225 if (!source.InterferesWith(other->source())) continue;
226 } 226 }
(...skipping 14 matching lines...) Expand all
241 other->set_source(destination); 241 other->set_source(destination);
242 } else if (destination.EqualsCanonicalized(other->source())) { 242 } else if (destination.EqualsCanonicalized(other->source())) {
243 other->set_source(source); 243 other->set_source(source);
244 } 244 }
245 } 245 }
246 } 246 }
247 } 247 }
248 } // namespace compiler 248 } // namespace compiler
249 } // namespace internal 249 } // namespace internal
250 } // namespace v8 250 } // namespace v8
OLDNEW
« no previous file with comments | « src/base/platform/platform-win32.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698