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

Unified Diff: src/compiler/pipeline.h

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 5 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/phi-reducer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.h
diff --git a/src/compiler/pipeline.h b/src/compiler/pipeline.h
new file mode 100644
index 0000000000000000000000000000000000000000..807495f9a87bb159258315654a0979d8fc31a19c
--- /dev/null
+++ b/src/compiler/pipeline.h
@@ -0,0 +1,71 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_PIPELINE_H_
+#define V8_COMPILER_PIPELINE_H_
+
+#include "src/v8.h"
+
+#include "src/compiler.h"
+
+// Note: TODO(turbofan) implies a performance improvement opportunity,
+// and TODO(name) implies an incomplete implementation
+
+#if V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_ARM64 || \
+ V8_TARGET_ARCH_ARM
+#define V8_TURBOFAN_TARGET 1
+#else
+#define V8_TURBOFAN_TARGET 0
+#endif
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Clients of this interface shouldn't depend on lots of compiler internals.
+class CallDescriptor;
+class Graph;
+class Schedule;
+class SourcePositionTable;
+class Linkage;
+
+class Pipeline {
+ public:
+ explicit Pipeline(CompilationInfo* info) : info_(info) {}
+
+ // Run the entire pipeline and generate a handle to a code object.
+ Handle<Code> GenerateCode();
+
+ // Run the pipeline on a machine graph and generate code. If {schedule}
+ // is {NULL}, then compute a new schedule for code generation.
+ Handle<Code> GenerateCodeForMachineGraph(Linkage* linkage, Graph* graph,
+ Schedule* schedule = NULL);
+
+ CompilationInfo* info() const { return info_; }
+ Zone* zone() { return info_->zone(); }
+ Isolate* isolate() { return info_->isolate(); }
+
+ static inline bool SupportedTarget() { return V8_TURBOFAN_TARGET != 0; }
+
+ static inline bool VerifyGraphs() {
+#ifdef DEBUG
+ return true;
+#else
+ return FLAG_turbo_verify;
+#endif
+ }
+
+ private:
+ CompilationInfo* info_;
+
+ Schedule* ComputeSchedule(Graph* graph);
+ void VerifyAndPrintGraph(Graph* graph, const char* phase);
+ Handle<Code> GenerateCode(Linkage* linkage, Graph* graph, Schedule* schedule,
+ SourcePositionTable* source_positions);
+};
+}
+}
+} // namespace v8::internal::compiler
+
+#endif // V8_COMPILER_PIPELINE_H_
« no previous file with comments | « src/compiler/phi-reducer.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698