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

Unified Diff: src/compiler/pipeline.cc

Issue 1900713005: [wasm] First step to separate graph construction from graph compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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/compiler/pipeline.h ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index e29c5d2f3c40761c86ccfb1efe6319fc41327385..b158d8b37ac32c37914556c0c36417c031e57d62 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -73,7 +73,7 @@ namespace v8 {
namespace internal {
namespace compiler {
-class PipelineData {
+class PipelineData : public ZoneObject {
public:
// For main entry point.
PipelineData(ZonePool* zone_pool, CompilationInfo* info,
@@ -172,12 +172,14 @@ class PipelineData {
register_allocation_zone_(register_allocation_zone_scope_.zone()),
register_allocation_data_(nullptr) {}
- ~PipelineData() {
+ void Destroy() {
DeleteRegisterAllocationZone();
DeleteInstructionZone();
DeleteGraphZone();
}
+ ~PipelineData() { Destroy(); }
+
Isolate* isolate() const { return isolate_; }
CompilationInfo* info() const { return info_; }
ZonePool* zone_pool() const { return zone_pool_; }
@@ -1396,6 +1398,14 @@ Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info,
return pipeline.ScheduleAndGenerateCode(call_descriptor);
}
+void Pipeline::InitializeWasmCompilation(Zone* pipeline_zone,
+ ZonePool* zone_pool, Graph* graph) {
+ data_ = new (pipeline_zone) PipelineData(zone_pool, info(), graph, nullptr);
+ RunPrintAndVerify("Machine", true);
+}
+
+void Pipeline::FinalizeWasmCompilation() { data_->Destroy(); }
+
OptimizedCompileJob* Pipeline::NewCompilationJob(CompilationInfo* info) {
return new (info->zone()) PipelineCompilationJob(info);
}
@@ -1418,6 +1428,7 @@ Handle<Code> Pipeline::ScheduleAndGenerateCode(
CallDescriptor* call_descriptor) {
PipelineData* data = this->data_;
+ DCHECK_NOT_NULL(data);
DCHECK_NOT_NULL(data->graph());
if (data->schedule() == nullptr) Run<ComputeSchedulePhase>();
« no previous file with comments | « src/compiler/pipeline.h ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698