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

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

Issue 286903019: Don't replace initializing smi stores during store elimination. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "hydrogen-store-elimination.h" 5 #include "hydrogen-store-elimination.h"
6 #include "hydrogen-instructions.h" 6 #include "hydrogen-instructions.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 } 52 }
53 53
54 54
55 void HStoreEliminationPhase::ProcessStore(HStoreNamedField* store) { 55 void HStoreEliminationPhase::ProcessStore(HStoreNamedField* store) {
56 HValue* object = store->object()->ActualValue(); 56 HValue* object = store->object()->ActualValue();
57 int i = 0; 57 int i = 0;
58 while (i < unobserved_.length()) { 58 while (i < unobserved_.length()) {
59 HStoreNamedField* prev = unobserved_.at(i); 59 HStoreNamedField* prev = unobserved_.at(i);
60 if (aliasing_->MustAlias(object, prev->object()->ActualValue()) && 60 if (aliasing_->MustAlias(object, prev->object()->ActualValue()) &&
61 store->access().Equals(prev->access())) { 61 prev->CanBeReplacedWith(store)) {
62 // This store is guaranteed to overwrite the previous store. 62 // This store is guaranteed to overwrite the previous store.
63 prev->DeleteAndReplaceWith(NULL); 63 prev->DeleteAndReplaceWith(NULL);
64 TRACE(("++ Unobserved store S%d overwritten by S%d\n", 64 TRACE(("++ Unobserved store S%d overwritten by S%d\n",
65 prev->id(), store->id())); 65 prev->id(), store->id()));
66 unobserved_.Remove(i); 66 unobserved_.Remove(i);
67 } else { 67 } else {
68 // TODO(titzer): remove map word clearing from folded allocations. 68 // TODO(titzer): remove map word clearing from folded allocations.
69 i++; 69 i++;
70 } 70 }
71 } 71 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 return; 107 return;
108 } 108 }
109 if (instr->DependsOnFlags().ContainsAnyOf(flags)) { 109 if (instr->DependsOnFlags().ContainsAnyOf(flags)) {
110 TRACE(("-- Observed stores at I%d (GVN flags)\n", instr->id())); 110 TRACE(("-- Observed stores at I%d (GVN flags)\n", instr->id()));
111 unobserved_.Rewind(0); 111 unobserved_.Rewind(0);
112 return; 112 return;
113 } 113 }
114 } 114 }
115 115
116 } } // namespace v8::internal 116 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698