Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 1bd1cf9b9fb0666637be2c32b024ef8b842459c1..c8de905a73bd287358f09f02171c34d9c55c8a4a 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -70,7 +70,7 @@ |
#include "src/compiler/typer.h" |
#include "src/compiler/value-numbering-reducer.h" |
#include "src/compiler/verifier.h" |
-#include "src/compiler/zone-pool.h" |
+#include "src/compiler/zone-stats.h" |
#include "src/isolate-inl.h" |
#include "src/ostreams.h" |
#include "src/parsing/parse-info.h" |
@@ -85,19 +85,19 @@ namespace compiler { |
class PipelineData { |
public: |
// For main entry point. |
- PipelineData(ZonePool* zone_pool, CompilationInfo* info, |
+ PipelineData(ZoneStats* zone_stats, CompilationInfo* info, |
PipelineStatistics* pipeline_statistics) |
: isolate_(info->isolate()), |
info_(info), |
debug_name_(info_->GetDebugName()), |
outer_zone_(info_->zone()), |
- zone_pool_(zone_pool), |
+ zone_stats_(zone_stats), |
pipeline_statistics_(pipeline_statistics), |
- graph_zone_scope_(zone_pool_), |
+ graph_zone_scope_(zone_stats_), |
graph_zone_(graph_zone_scope_.zone()), |
- instruction_zone_scope_(zone_pool_), |
+ instruction_zone_scope_(zone_stats_), |
instruction_zone_(instruction_zone_scope_.zone()), |
- register_allocation_zone_scope_(zone_pool_), |
+ register_allocation_zone_scope_(zone_stats_), |
register_allocation_zone_(register_allocation_zone_scope_.zone()) { |
PhaseScope scope(pipeline_statistics, "init pipeline data"); |
graph_ = new (graph_zone_) Graph(graph_zone_); |
@@ -114,48 +114,48 @@ class PipelineData { |
} |
// For WASM compile entry point. |
- PipelineData(ZonePool* zone_pool, CompilationInfo* info, Graph* graph, |
+ PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph, |
SourcePositionTable* source_positions) |
: isolate_(info->isolate()), |
info_(info), |
debug_name_(info_->GetDebugName()), |
- zone_pool_(zone_pool), |
- graph_zone_scope_(zone_pool_), |
+ zone_stats_(zone_stats), |
+ graph_zone_scope_(zone_stats_), |
graph_(graph), |
source_positions_(source_positions), |
- instruction_zone_scope_(zone_pool_), |
+ instruction_zone_scope_(zone_stats_), |
instruction_zone_(instruction_zone_scope_.zone()), |
- register_allocation_zone_scope_(zone_pool_), |
+ register_allocation_zone_scope_(zone_stats_), |
register_allocation_zone_(register_allocation_zone_scope_.zone()) {} |
// For machine graph testing entry point. |
- PipelineData(ZonePool* zone_pool, CompilationInfo* info, Graph* graph, |
+ PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph, |
Schedule* schedule) |
: isolate_(info->isolate()), |
info_(info), |
debug_name_(info_->GetDebugName()), |
- zone_pool_(zone_pool), |
- graph_zone_scope_(zone_pool_), |
+ zone_stats_(zone_stats), |
+ graph_zone_scope_(zone_stats_), |
graph_(graph), |
source_positions_(new (info->zone()) SourcePositionTable(graph_)), |
schedule_(schedule), |
- instruction_zone_scope_(zone_pool_), |
+ instruction_zone_scope_(zone_stats_), |
instruction_zone_(instruction_zone_scope_.zone()), |
- register_allocation_zone_scope_(zone_pool_), |
+ register_allocation_zone_scope_(zone_stats_), |
register_allocation_zone_(register_allocation_zone_scope_.zone()) {} |
// For register allocation testing entry point. |
- PipelineData(ZonePool* zone_pool, CompilationInfo* info, |
+ PipelineData(ZoneStats* zone_stats, CompilationInfo* info, |
InstructionSequence* sequence) |
: isolate_(info->isolate()), |
info_(info), |
debug_name_(info_->GetDebugName()), |
- zone_pool_(zone_pool), |
- graph_zone_scope_(zone_pool_), |
- instruction_zone_scope_(zone_pool_), |
+ zone_stats_(zone_stats), |
+ graph_zone_scope_(zone_stats_), |
+ instruction_zone_scope_(zone_stats_), |
instruction_zone_(sequence->zone()), |
sequence_(sequence), |
- register_allocation_zone_scope_(zone_pool_), |
+ register_allocation_zone_scope_(zone_stats_), |
register_allocation_zone_(register_allocation_zone_scope_.zone()) {} |
~PipelineData() { |
@@ -166,7 +166,7 @@ class PipelineData { |
Isolate* isolate() const { return isolate_; } |
CompilationInfo* info() const { return info_; } |
- ZonePool* zone_pool() const { return zone_pool_; } |
+ ZoneStats* zone_stats() const { return zone_stats_; } |
PipelineStatistics* pipeline_statistics() { return pipeline_statistics_; } |
bool compilation_failed() const { return compilation_failed_; } |
void set_compilation_failed() { compilation_failed_ = true; } |
@@ -313,14 +313,14 @@ class PipelineData { |
CompilationInfo* const info_; |
std::unique_ptr<char[]> debug_name_; |
Zone* outer_zone_ = nullptr; |
- ZonePool* const zone_pool_; |
+ ZoneStats* const zone_stats_; |
PipelineStatistics* pipeline_statistics_ = nullptr; |
bool compilation_failed_ = false; |
Handle<Code> code_ = Handle<Code>::null(); |
// All objects in the following group of fields are allocated in graph_zone_. |
// They are all set to nullptr when the graph_zone_ is destroyed. |
- ZonePool::Scope graph_zone_scope_; |
+ ZoneStats::Scope graph_zone_scope_; |
Zone* graph_zone_ = nullptr; |
Graph* graph_ = nullptr; |
SourcePositionTable* source_positions_ = nullptr; |
@@ -337,7 +337,7 @@ class PipelineData { |
// instruction_zone_. They are all set to nullptr when the instruction_zone_ |
// is |
// destroyed. |
- ZonePool::Scope instruction_zone_scope_; |
+ ZoneStats::Scope instruction_zone_scope_; |
Zone* instruction_zone_; |
InstructionSequence* sequence_ = nullptr; |
Frame* frame_ = nullptr; |
@@ -345,7 +345,7 @@ class PipelineData { |
// All objects in the following group of fields are allocated in |
// register_allocation_zone_. They are all set to nullptr when the zone is |
// destroyed. |
- ZonePool::Scope register_allocation_zone_scope_; |
+ ZoneStats::Scope register_allocation_zone_scope_; |
Zone* register_allocation_zone_; |
RegisterAllocationData* register_allocation_data_ = nullptr; |
@@ -518,21 +518,21 @@ class PipelineRunScope { |
: phase_scope_( |
phase_name == nullptr ? nullptr : data->pipeline_statistics(), |
phase_name), |
- zone_scope_(data->zone_pool()) {} |
+ zone_scope_(data->zone_stats()) {} |
Zone* zone() { return zone_scope_.zone(); } |
private: |
PhaseScope phase_scope_; |
- ZonePool::Scope zone_scope_; |
+ ZoneStats::Scope zone_scope_; |
}; |
PipelineStatistics* CreatePipelineStatistics(CompilationInfo* info, |
- ZonePool* zone_pool) { |
+ ZoneStats* zone_stats) { |
PipelineStatistics* pipeline_statistics = nullptr; |
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
- pipeline_statistics = new PipelineStatistics(info, zone_pool); |
+ pipeline_statistics = new PipelineStatistics(info, zone_stats); |
pipeline_statistics->BeginPhaseKind("initializing"); |
} |
@@ -569,11 +569,11 @@ class PipelineCompilationJob final : public CompilationJob { |
// to the CompilationJob constructor, but it is not dereferenced there. |
: CompilationJob(isolate, &info_, "TurboFan"), |
zone_(isolate->allocator()), |
- zone_pool_(isolate->allocator()), |
+ zone_stats_(isolate->allocator()), |
parse_info_(&zone_, function), |
info_(&parse_info_, function), |
- pipeline_statistics_(CreatePipelineStatistics(info(), &zone_pool_)), |
- data_(&zone_pool_, info(), pipeline_statistics_.get()), |
+ pipeline_statistics_(CreatePipelineStatistics(info(), &zone_stats_)), |
+ data_(&zone_stats_, info(), pipeline_statistics_.get()), |
pipeline_(&data_), |
linkage_(nullptr) {} |
@@ -584,7 +584,7 @@ class PipelineCompilationJob final : public CompilationJob { |
private: |
Zone zone_; |
- ZonePool zone_pool_; |
+ ZoneStats zone_stats_; |
ParseInfo parse_info_; |
CompilationInfo info_; |
std::unique_ptr<PipelineStatistics> pipeline_statistics_; |
@@ -662,8 +662,8 @@ class PipelineWasmCompilationJob final : public CompilationJob { |
SourcePositionTable* source_positions) |
: CompilationJob(info->isolate(), info, "TurboFan", |
State::kReadyToExecute), |
- zone_pool_(info->isolate()->allocator()), |
- data_(&zone_pool_, info, graph, source_positions), |
+ zone_stats_(info->isolate()->allocator()), |
+ data_(&zone_stats_, info, graph, source_positions), |
pipeline_(&data_), |
linkage_(descriptor) {} |
@@ -673,7 +673,7 @@ class PipelineWasmCompilationJob final : public CompilationJob { |
Status FinalizeJobImpl() final; |
private: |
- ZonePool zone_pool_; |
+ ZoneStats zone_stats_; |
PipelineData data_; |
PipelineImpl pipeline_; |
Linkage linkage_; |
@@ -1671,11 +1671,11 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, |
if (isolate->serializer_enabled()) info.PrepareForSerializing(); |
// Construct a pipeline for scheduling and code generation. |
- ZonePool zone_pool(isolate->allocator()); |
- PipelineData data(&zone_pool, &info, graph, schedule); |
+ ZoneStats zone_stats(isolate->allocator()); |
+ PipelineData data(&zone_stats, &info, graph, schedule); |
std::unique_ptr<PipelineStatistics> pipeline_statistics; |
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
- pipeline_statistics.reset(new PipelineStatistics(&info, &zone_pool)); |
+ pipeline_statistics.reset(new PipelineStatistics(&info, &zone_stats)); |
pipeline_statistics->BeginPhaseKind("stub codegen"); |
} |
@@ -1697,10 +1697,10 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, |
// static |
Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info) { |
- ZonePool zone_pool(info->isolate()->allocator()); |
+ ZoneStats zone_stats(info->isolate()->allocator()); |
std::unique_ptr<PipelineStatistics> pipeline_statistics( |
- CreatePipelineStatistics(info, &zone_pool)); |
- PipelineData data(&zone_pool, info, pipeline_statistics.get()); |
+ CreatePipelineStatistics(info, &zone_stats)); |
+ PipelineData data(&zone_stats, info, pipeline_statistics.get()); |
PipelineImpl pipeline(&data); |
Linkage linkage(Linkage::ComputeIncoming(data.instruction_zone(), info)); |
@@ -1725,11 +1725,11 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
Graph* graph, |
Schedule* schedule) { |
// Construct a pipeline for scheduling and code generation. |
- ZonePool zone_pool(info->isolate()->allocator()); |
- PipelineData data(&zone_pool, info, graph, schedule); |
+ ZoneStats zone_stats(info->isolate()->allocator()); |
+ PipelineData data(&zone_stats, info, graph, schedule); |
std::unique_ptr<PipelineStatistics> pipeline_statistics; |
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { |
- pipeline_statistics.reset(new PipelineStatistics(info, &zone_pool)); |
+ pipeline_statistics.reset(new PipelineStatistics(info, &zone_stats)); |
pipeline_statistics->BeginPhaseKind("test codegen"); |
} |
@@ -1764,8 +1764,8 @@ bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, |
bool run_verifier) { |
CompilationInfo info(ArrayVector("testing"), sequence->isolate(), |
sequence->zone(), Code::ComputeFlags(Code::STUB)); |
- ZonePool zone_pool(sequence->isolate()->allocator()); |
- PipelineData data(&zone_pool, &info, sequence); |
+ ZoneStats zone_stats(sequence->isolate()->allocator()); |
+ PipelineData data(&zone_stats, &info, sequence); |
PipelineImpl pipeline(&data); |
pipeline.data_->InitializeFrameData(nullptr); |
pipeline.AllocateRegisters(config, nullptr, run_verifier); |