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

[turbofan] escape analysis bugfixes that got reverted with...

[turbofan] escape analysis bugfixes that got reverted with https://codereview.chromium.org/2680973013/

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2701403003
Cr-Commit-Position: refs/heads/master@{#43321}
parent 3cf5edae
......@@ -694,6 +694,15 @@ void EscapeStatusAnalysis::Process(Node* node) {
RevisitInputs(rep);
RevisitUses(rep);
}
} else {
Node* from = NodeProperties::GetValueInput(node, 0);
from = object_analysis_->ResolveReplacement(from);
if (SetEscaped(from)) {
TRACE("Setting #%d (%s) to escaped because of unresolved load #%i\n",
from->id(), from->op()->mnemonic(), node->id());
RevisitInputs(from);
RevisitUses(from);
}
}
RevisitUses(node);
break;
......@@ -898,7 +907,7 @@ EscapeAnalysis::EscapeAnalysis(Graph* graph, CommonOperatorBuilder* common,
EscapeAnalysis::~EscapeAnalysis() {}
void EscapeAnalysis::Run() {
bool EscapeAnalysis::Run() {
replacements_.resize(graph()->NodeCount());
status_analysis_->AssignAliases();
if (status_analysis_->AliasCount() > 0) {
......@@ -907,6 +916,9 @@ void EscapeAnalysis::Run() {
status_analysis_->ResizeStatusVector();
RunObjectAnalysis();
status_analysis_->RunStatusAnalysis();
return true;
} else {
return false;
}
}
......
......@@ -26,9 +26,10 @@ class V8_EXPORT_PRIVATE EscapeAnalysis {
EscapeAnalysis(Graph* graph, CommonOperatorBuilder* common, Zone* zone);
~EscapeAnalysis();
void Run();
bool Run();
Node* GetReplacement(Node* node);
Node* ResolveReplacement(Node* node);
bool IsVirtual(Node* node);
bool IsEscaped(Node* node);
bool CompareVirtualObjects(Node* left, Node* right);
......@@ -59,7 +60,6 @@ class V8_EXPORT_PRIVATE EscapeAnalysis {
Node* node);
Node* replacement(Node* node);
Node* ResolveReplacement(Node* node);
bool UpdateReplacement(VirtualState* state, Node* node, Node* rep);
VirtualObject* GetVirtualObject(VirtualState* state, Node* node);
......
......@@ -949,7 +949,7 @@ struct EscapeAnalysisPhase {
void Run(PipelineData* data, Zone* temp_zone) {
EscapeAnalysis escape_analysis(data->graph(), data->jsgraph()->common(),
temp_zone);
escape_analysis.Run();
if (!escape_analysis.Run()) return;
JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
EscapeAnalysisReducer escape_reducer(&graph_reducer, data->jsgraph(),
&escape_analysis, temp_zone);
......
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