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

Unified Diff: src/crankshaft/hydrogen-instructions.cc

Issue 2297983003: [crankshaft] Disable further folding already folded allocations. (Closed)
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-crbug-621868.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen-instructions.cc
diff --git a/src/crankshaft/hydrogen-instructions.cc b/src/crankshaft/hydrogen-instructions.cc
index b8020c727064914dae35b8478b9be95be8bbee8b..e2140cf73aa194ba99acdb1e55b2aa4357fb8374 100644
--- a/src/crankshaft/hydrogen-instructions.cc
+++ b/src/crankshaft/hydrogen-instructions.cc
@@ -3184,6 +3184,13 @@ bool HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
return false;
}
+ if (IsAllocationFoldingDominator()) {
+ if (FLAG_trace_allocation_folding) {
+ PrintF("#%d (%s) cannot fold into #%d (%s), already dominator\n", id(),
+ Mnemonic(), dominator->id(), dominator->Mnemonic());
+ }
+ return false;
+ }
if (!IsFoldable(dominator_allocate)) {
if (FLAG_trace_allocation_folding) {
@@ -3235,17 +3242,6 @@ bool HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
}
}
- if (IsAllocationFoldingDominator()) {
- DeleteAndReplaceWith(dominator_allocate);
- if (FLAG_trace_allocation_folding) {
- PrintF(
- "#%d (%s) folded dominator into #%d (%s), new dominator size: %d\n",
- id(), Mnemonic(), dominator_allocate->id(),
- dominator_allocate->Mnemonic(), new_dominator_size);
- }
- return true;
- }
-
if (!dominator_allocate->IsAllocationFoldingDominator()) {
HAllocate* first_alloc =
HAllocate::New(isolate, zone, dominator_allocate->context(),
@@ -3280,6 +3276,8 @@ std::ostream& HAllocate::PrintDataTo(std::ostream& os) const { // NOLINT
if (IsOldSpaceAllocation()) os << "P";
if (MustAllocateDoubleAligned()) os << "A";
if (MustPrefillWithFiller()) os << "F";
+ if (IsAllocationFoldingDominator()) os << "d";
+ if (IsAllocationFolded()) os << "f";
return os << ")";
}
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | test/mjsunit/regress/regress-crbug-621868.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698