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

Side by Side Diff: src/compiler/store-store-elimination.cc

Issue 2295823002: [turbofan] In store-store elimination, revisit as often as necessary. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 <iterator> 5 #include <iterator>
6 6
7 #include "src/compiler/store-store-elimination.h" 7 #include "src/compiler/store-store-elimination.h"
8 8
9 #include "src/compiler/all-nodes.h" 9 #include "src/compiler/all-nodes.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 if (!cur_set_changed) { 398 if (!cur_set_changed) {
399 // We will not be able to update the part of this chain above any more. 399 // We will not be able to update the part of this chain above any more.
400 // Exit. 400 // Exit.
401 TRACE("+ No change: stabilized. Not visiting effect inputs."); 401 TRACE("+ No change: stabilized. Not visiting effect inputs.");
402 } else { 402 } else {
403 unobservable_for_id(node->id()) = before_set; 403 unobservable_for_id(node->id()) = before_set;
404 404
405 // Mark effect inputs for visiting. 405 // Mark effect inputs for visiting.
406 for (int i = 0; i < node->op()->EffectInputCount(); i++) { 406 for (int i = 0; i < node->op()->EffectInputCount(); i++) {
407 Node* input = NodeProperties::GetEffectInput(node, i); 407 Node* input = NodeProperties::GetEffectInput(node, i);
408 if (!HasBeenVisited(input)) { 408 TRACE(" marking #%d:%s for revisit", input->id(),
409 TRACE(" marking #%d:%s for revisit", input->id(), 409 input->op()->mnemonic());
410 input->op()->mnemonic()); 410 MarkForRevisit(input);
411 MarkForRevisit(input);
412 }
413 } 411 }
414 } 412 }
415 } 413 }
416 414
417 // Compute the intersection of the UnobservablesSets of all effect uses and 415 // Compute the intersection of the UnobservablesSets of all effect uses and
418 // return it. This function only works if {node} has an effect use. 416 // return it. This function only works if {node} has an effect use.
419 // 417 //
420 // The result UnobservablesSet will always be visited. 418 // The result UnobservablesSet will always be visited.
421 UnobservablesSet RedundantStoreFinder::RecomputeUseIntersection(Node* node) { 419 UnobservablesSet RedundantStoreFinder::RecomputeUseIntersection(Node* node) {
422 // {first} == true indicates that we haven't looked at any elements yet. 420 // {first} == true indicates that we haven't looked at any elements yet.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 return !(*this == other); 559 return !(*this == other);
562 } 560 }
563 561
564 bool UnobservableStore::operator<(const UnobservableStore other) const { 562 bool UnobservableStore::operator<(const UnobservableStore other) const {
565 return (id_ < other.id_) || (id_ == other.id_ && offset_ < other.offset_); 563 return (id_ < other.id_) || (id_ == other.id_ && offset_ < other.offset_);
566 } 564 }
567 565
568 } // namespace compiler 566 } // namespace compiler
569 } // namespace internal 567 } // namespace internal
570 } // namespace v8 568 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698