Revision: 22081
Author: [email protected]
Date: Mon Jun 30 08:59:23 2014 UTC
Log: Remove kDontInline and simplify compiler hints.
[email protected]
Review URL: https://codereview.chromium.org/359733004
http://code.google.com/p/v8/source/detail?r=22081
Modified:
/branches/bleeding_edge/src/ast.cc
/branches/bleeding_edge/src/ast.h
/branches/bleeding_edge/src/compiler.cc
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/objects-inl.h
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/ast.cc Fri Jun 27 11:04:35 2014 UTC
+++ /branches/bleeding_edge/src/ast.cc Mon Jun 30 08:59:23 2014 UTC
@@ -1028,7 +1028,6 @@
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
increase_node_count(); \
set_dont_optimize_reason(k##NodeType); \
- add_flag(kDontInline); \
add_flag(kDontSelfOptimize); \
}
#define DONT_SELFOPTIMIZE_NODE(NodeType) \
@@ -1046,7 +1045,6 @@
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
increase_node_count(); \
set_dont_optimize_reason(k##NodeType); \
- add_flag(kDontInline); \
add_flag(kDontSelfOptimize); \
add_flag(kDontCache); \
}
@@ -1079,7 +1077,8 @@
REGULAR_NODE_WITH_FEEDBACK_SLOTS(Call)
REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew)
// In theory, for VariableProxy we'd have to add:
-// if (node->var()->IsLookupSlot()) add_flag(kDontInline);
+// if (node->var()->IsLookupSlot())
+//
set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup);
// But node->var() is usually not bound yet at VariableProxy creation
time, and
// LOOKUP variables only result from constructs that cannot be inlined
anyway.
REGULAR_NODE(VariableProxy)
@@ -1111,9 +1110,8 @@
void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
increase_node_count();
if (node->is_jsruntime()) {
- // Don't try to inline JS runtime calls because we don't (currently)
even
- // optimize them.
- add_flag(kDontInline);
+ // Don't try to optimize JS runtime calls because we bailout on them.
+ set_dont_optimize_reason(kCallToAJavaScriptRuntimeFunction);
}
}
=======================================
--- /branches/bleeding_edge/src/ast.h Thu Jun 26 11:59:42 2014 UTC
+++ /branches/bleeding_edge/src/ast.h Mon Jun 30 08:59:23 2014 UTC
@@ -149,7 +149,6 @@
enum AstPropertiesFlag {
- kDontInline,
kDontSelfOptimize,
kDontSoftInline,
kDontCache
=======================================
--- /branches/bleeding_edge/src/compiler.cc Fri Jun 27 12:10:43 2014 UTC
+++ /branches/bleeding_edge/src/compiler.cc Mon Jun 30 08:59:23 2014 UTC
@@ -580,8 +580,7 @@
// Check the function has compiled code.
ASSERT(shared->is_compiled());
- shared->set_dont_optimize_reason(lit->dont_optimize_reason());
- shared->set_dont_inline(lit->flags()->Contains(kDontInline));
+ shared->set_bailout_reason(lit->dont_optimize_reason());
shared->set_ast_node_count(lit->ast_node_count());
shared->set_strict_mode(lit->strict_mode());
}
@@ -613,8 +612,7 @@
function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
function_info->set_ast_node_count(lit->ast_node_count());
function_info->set_is_function(lit->is_function());
- function_info->set_dont_optimize_reason(lit->dont_optimize_reason());
- function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
+ function_info->set_bailout_reason(lit->dont_optimize_reason());
function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
function_info->set_is_generator(lit->is_generator());
}
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Sat Jun 28 00:33:04 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Mon Jun 30 08:59:23 2014 UTC
@@ -7576,7 +7576,7 @@
TraceInline(target, caller, "target not inlineable");
return kNotInlinable;
}
- if (target_shared->dont_inline()) {
+ if (target_shared->DisableOptimizationReason() != kNoReason) {
TraceInline(target, caller, "target contains unsupported syntax
[early]");
return kNotInlinable;
}
@@ -7663,8 +7663,7 @@
TraceInline(target, caller, "target AST is too large [late]");
return false;
}
- AstProperties::Flags* flags(function->flags());
- if (flags->Contains(kDontInline) || function->dont_optimize()) {
+ if (function->dont_optimize()) {
TraceInline(target, caller, "target contains unsupported syntax
[late]");
return false;
}
=======================================
--- /branches/bleeding_edge/src/objects-inl.h Thu Jun 26 00:40:45 2014 UTC
+++ /branches/bleeding_edge/src/objects-inl.h Mon Jun 30 08:59:23 2014 UTC
@@ -5447,7 +5447,6 @@
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous,
kIsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function,
kIsFunction)
-BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline,
kDontInline)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator,
kIsGenerator)
=======================================
--- /branches/bleeding_edge/src/objects.h Thu Jun 26 06:32:51 2014 UTC
+++ /branches/bleeding_edge/src/objects.h Mon Jun 30 08:59:23 2014 UTC
@@ -7223,9 +7223,6 @@
// Is this a function or top-level/eval code.
DECL_BOOLEAN_ACCESSORS(is_function)
- // Indicates that the function cannot be inlined.
- DECL_BOOLEAN_ACCESSORS(dont_inline)
-
// Indicates that code for this function cannot be cached.
DECL_BOOLEAN_ACCESSORS(dont_cache)
@@ -7286,11 +7283,6 @@
DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(),
reason));
}
-
- void set_dont_optimize_reason(BailoutReason reason) {
- set_bailout_reason(reason);
- set_dont_inline(reason != kNoReason);
- }
// Check whether or not this function is inlineable.
bool IsInlineable();
@@ -7434,7 +7426,6 @@
kIsAnonymous,
kNameShouldPrintAsAnonymous,
kIsFunction,
- kDontInline,
kDontCache,
kDontFlush,
kIsGenerator,
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.