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

Unified Diff: src/hydrogen.h

Issue 8677008: Relax inlining limits for simple leaf functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Save/restore node count in FunctionState, add comments. Created 9 years, 1 month 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.cc ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 948ea342bce660e12c8e14067b4b305188317560..e942a7eaed24442643b0887936c698a17bcdc002 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -752,9 +752,20 @@ class HGraphBuilder: public AstVisitor {
static const int kMaxLoadPolymorphism = 4;
static const int kMaxStorePolymorphism = 4;
- static const int kMaxInlinedNodes = 196;
- static const int kMaxInlinedSize = 196;
- static const int kMaxSourceSize = 600;
+
+ // Hard limits.
+ static const int kMaxSourceSize = 600; // Per site.
+ static const int kMaxInlinedNodesHard = 270; // Cumulative.
+ static const int kMaxInlinedSize = 196; // Per site.
+
+ // Soft limits. After the soft limit is reached, we will inline only small
+ // "primitive" functions, where "primitive" is defined by syntactic criterion.
+ static const int kMaxInlinedNodesSoft = 196; // Cumulative.
+ static const int kMaxInlinedPrimitiveSize = 40; // Per site.
+ STATIC_ASSERT(kMaxInlinedSize < SharedFunctionInfo::kAstNodeCountMask);
+ STATIC_ASSERT(kMaxInlinedPrimitiveSize < kMaxInlinedSize);
+ STATIC_ASSERT(kMaxInlinedNodesSoft < kMaxInlinedNodesHard);
+
// Simple accessors.
void set_function_state(FunctionState* state) { function_state_ = state; }
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698