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

Unified Diff: src/compiler/js-inlining.h

Issue 1391903002: [turbofan] Separate JSInliningHeuristic into own class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 2 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 | « BUILD.gn ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.h
diff --git a/src/compiler/js-inlining.h b/src/compiler/js-inlining.h
index 21057e61e40612154c61f75e6d81614263eb770e..a77dceb3342da48791ea7b098c3e32fdf4960e98 100644
--- a/src/compiler/js-inlining.h
+++ b/src/compiler/js-inlining.h
@@ -19,22 +19,26 @@ namespace compiler {
// Forward declarations.
class JSCallFunctionAccessor;
+// The JSInliner provides the core graph inlining machinery. Note that this
+// class only deals with the mechanics of how to inline one graph into another,
+// heuristics that decide what and how much to inline are beyond its scope.
class JSInliner final : public AdvancedReducer {
public:
- enum Mode { kRestrictedInlining, kGeneralInlining };
-
- JSInliner(Editor* editor, Mode mode, Zone* local_zone, CompilationInfo* info,
+ JSInliner(Editor* editor, Zone* local_zone, CompilationInfo* info,
JSGraph* jsgraph)
: AdvancedReducer(editor),
- mode_(mode),
local_zone_(local_zone),
info_(info),
jsgraph_(jsgraph) {}
+ // Reducer interface, eagerly inlines everything.
Reduction Reduce(Node* node) final;
+ // Can be used by inlining heuristics or by testing code directly, without
+ // using the above generic reducer interface of the inlining machinery.
+ Reduction ReduceJSCallFunction(Node* node, Handle<JSFunction> function);
+
private:
- Mode const mode_;
Zone* local_zone_;
CompilationInfo* info_;
JSGraph* jsgraph_;
« no previous file with comments | « BUILD.gn ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698