Commit e3ac5a31 authored by tebbi's avatar tebbi Committed by Commit bot

Revert of [turbofan] fix another divergence in escape analysis (patchset #1...

Revert of [turbofan] fix another divergence in escape analysis (patchset #1 id:1 of https://codereview.chromium.org/2599793002/ )

Reason for revert:
Caused memory corruption.

BUG=chromium:676767

Original issue's description:
> [turbofan] fix another divergence in escape analysis
>
> This divergence bug is very similar to the one fixed in https://codereview.chromium.org/2522253002/, this time it is an oscillation between a cleared field and a new phi node. The page http://www.sears.com/clothing-shoes-jewelry-clothing-men-s-clothing-men-s-jeans/b-1325287370?Brand=LEE&filterList=Brand&sortOption=UNITS_HIGH_TO_LOW allows for a reliable reproduction.
>
> This fix makes sure that once a field that generated a phi gets cleared, it always stays cleared.
>
> BUG=chromium:670202
>
> R=bmeurer@chromium.org
>
> Review-Url: https://codereview.chromium.org/2599793002
> Cr-Commit-Position: refs/heads/master@{#41922}
> Committed: https://chromium.googlesource.com/v8/v8/+/8435cc852672c504d5899cc2765c5b895e658efe

TBR=bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:670202

Review-Url: https://codereview.chromium.org/2611623002
Cr-Commit-Position: refs/heads/master@{#42023}
parent 1795343f
...@@ -168,7 +168,7 @@ class VirtualObject : public ZoneObject { ...@@ -168,7 +168,7 @@ class VirtualObject : public ZoneObject {
void SetField(size_t offset, Node* node, bool created_phi = false) { void SetField(size_t offset, Node* node, bool created_phi = false) {
fields_[offset] = node; fields_[offset] = node;
phi_[offset] = phi_[offset] || created_phi; phi_[offset] = created_phi;
} }
bool IsTracked() const { return status_ & kTracked; } bool IsTracked() const { return status_ & kTracked; }
bool IsInitialized() const { return status_ & kInitialized; } bool IsInitialized() const { return status_ & kInitialized; }
...@@ -485,8 +485,7 @@ bool VirtualObject::MergeFrom(MergeCache* cache, Node* at, Graph* graph, ...@@ -485,8 +485,7 @@ bool VirtualObject::MergeFrom(MergeCache* cache, Node* at, Graph* graph,
size_t arity = at->opcode() == IrOpcode::kEffectPhi size_t arity = at->opcode() == IrOpcode::kEffectPhi
? at->op()->EffectInputCount() ? at->op()->EffectInputCount()
: at->op()->ValueInputCount(); : at->op()->ValueInputCount();
if (cache->fields().size() == arity && if (cache->fields().size() == arity) {
(GetField(i) || !IsCreatedPhi(i))) {
changed = MergeFields(i, at, cache, graph, common) || changed; changed = MergeFields(i, at, cache, graph, common) || changed;
} else { } else {
if (GetField(i) != nullptr) { if (GetField(i) != nullptr) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment