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

Side by Side Diff: src/crankshaft/hydrogen-instructions.h

Issue 2022743002: [crankshaft] There is no guarantee that allocations are folded in Crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 5130 matching lines...) Expand 10 before | Expand all | Expand 10 after
5141 HValue* dominator) { 5141 HValue* dominator) {
5142 // There may be multiple inner allocates dominated by one allocate. 5142 // There may be multiple inner allocates dominated by one allocate.
5143 while (object->IsInnerAllocatedObject()) { 5143 while (object->IsInnerAllocatedObject()) {
5144 object = HInnerAllocatedObject::cast(object)->base_object(); 5144 object = HInnerAllocatedObject::cast(object)->base_object();
5145 } 5145 }
5146 5146
5147 if (object->IsAllocate()) { 5147 if (object->IsAllocate()) {
5148 HAllocate* allocate = HAllocate::cast(object); 5148 HAllocate* allocate = HAllocate::cast(object);
5149 if (allocate->IsAllocationFolded()) { 5149 if (allocate->IsAllocationFolded()) {
5150 HValue* dominator = allocate->allocation_folding_dominator(); 5150 HValue* dominator = allocate->allocation_folding_dominator();
5151 DCHECK(HAllocate::cast(dominator)->IsAllocationFoldingDominator()); 5151 // There is no guarantee that all allocations are folded together because
5152 object = dominator; 5152 // GVN performs a fixpoint.
5153 if (HAllocate::cast(dominator)->IsAllocationFoldingDominator()) {
5154 object = dominator;
5155 }
5153 } 5156 }
5154 } 5157 }
5155 5158
5156 if (object->IsConstant() && 5159 if (object->IsConstant() &&
5157 HConstant::cast(object)->HasExternalReferenceValue()) { 5160 HConstant::cast(object)->HasExternalReferenceValue()) {
5158 // Stores to external references require no write barriers 5161 // Stores to external references require no write barriers
5159 return false; 5162 return false;
5160 } 5163 }
5161 // We definitely need a write barrier unless the object is the allocation 5164 // We definitely need a write barrier unless the object is the allocation
5162 // dominator. 5165 // dominator.
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
7204 bool IsDeletable() const override { return true; } 7207 bool IsDeletable() const override { return true; }
7205 }; 7208 };
7206 7209
7207 #undef DECLARE_INSTRUCTION 7210 #undef DECLARE_INSTRUCTION
7208 #undef DECLARE_CONCRETE_INSTRUCTION 7211 #undef DECLARE_CONCRETE_INSTRUCTION
7209 7212
7210 } // namespace internal 7213 } // namespace internal
7211 } // namespace v8 7214 } // namespace v8
7212 7215
7213 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ 7216 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_
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