Commit 56eca6d3 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[crankshaft] Remove graph builder from optimized compile job.

There is no reason to keep around the HOptimizedGraphBuilder after the
graph has successfully been built. Later phases in OptimizedCompileJob
should not rely on it anymore.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/1756183002

Cr-Commit-Position: refs/heads/master@{#34440}
parent c854853b
......@@ -490,13 +490,13 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
info()->shared_info()->disable_optimization_reason());
}
graph_builder_ = (info()->is_tracking_positions() || FLAG_trace_ic)
? new (info()->zone())
HOptimizedGraphBuilderWithPositions(info())
: new (info()->zone()) HOptimizedGraphBuilder(info());
HOptimizedGraphBuilder* graph_builder =
(info()->is_tracking_positions() || FLAG_trace_ic)
? new (info()->zone()) HOptimizedGraphBuilderWithPositions(info())
: new (info()->zone()) HOptimizedGraphBuilder(info());
Timer t(this, &time_taken_to_create_graph_);
graph_ = graph_builder_->CreateGraph();
graph_ = graph_builder->CreateGraph();
if (isolate()->has_pending_exception()) {
return SetLastStatus(FAILED);
......@@ -533,7 +533,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::OptimizeGraph() {
chunk_ = LChunk::NewChunk(graph_);
if (chunk_ != NULL) return SetLastStatus(SUCCEEDED);
} else if (bailout_reason != kNoReason) {
graph_builder_->Bailout(bailout_reason);
info_->AbortOptimization(bailout_reason);
}
return SetLastStatus(BAILED_OUT);
......
......@@ -509,7 +509,6 @@ class CompilationHandleScope BASE_EMBEDDED {
class HGraph;
class HOptimizedGraphBuilder;
class LChunk;
// A helper class that calls the three compilation phases in
......@@ -522,7 +521,6 @@ class OptimizedCompileJob: public ZoneObject {
public:
explicit OptimizedCompileJob(CompilationInfo* info)
: info_(info),
graph_builder_(NULL),
graph_(NULL),
chunk_(NULL),
last_status_(FAILED),
......@@ -559,7 +557,6 @@ class OptimizedCompileJob: public ZoneObject {
private:
CompilationInfo* info_;
HOptimizedGraphBuilder* graph_builder_;
HGraph* graph_;
LChunk* chunk_;
base::TimeDelta time_taken_to_create_graph_;
......
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