Commit d1e849ef authored by Jaroslav Sevcik's avatar Jaroslav Sevcik Committed by Commit Bot

Expose the bytecode limit for optimization as a flag

Bug: v8:9119, v8:8598
Change-Id: Ia4765c19e60b58d938fe778776ee654b60631e39
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1564203
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60808}
parent 48efe388
......@@ -94,11 +94,6 @@ namespace v8 {
namespace internal {
namespace compiler {
// TurboFan can only handle 2^16 control inputs. Since each control flow split
// requires at least two bytes (jump and offset), we limit the bytecode size
// to 60KiB bytes.
const int kMaxBytecodeSizeForTurbofan = 60 * KB;
class PipelineData {
public:
// For main entry point.
......@@ -924,7 +919,7 @@ PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl(
this, TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "function",
compilation_info()->shared_info()->TraceIDRef());
if (compilation_info()->bytecode_array()->length() >
kMaxBytecodeSizeForTurbofan) {
FLAG_max_optimized_bytecode_size) {
return AbortOptimization(BailoutReason::kFunctionTooBig);
}
......
......@@ -500,6 +500,10 @@ DEFINE_FLOAT(reserve_inline_budget_scale_factor, 1.2,
"maximum cumulative size of bytecode considered for inlining")
DEFINE_INT(max_inlined_bytecode_size_small, 30,
"maximum size of bytecode considered for small function inlining")
DEFINE_INT(max_optimized_bytecode_size, 60 * KB,
"maximum bytecode size to "
"be considered for optimization; too high values may cause "
"the compiler to hit (release) assertions")
DEFINE_FLOAT(min_inlining_frequency, 0.15, "minimum frequency for inlining")
DEFINE_BOOL(polymorphic_inlining, true, "polymorphic inlining")
DEFINE_BOOL(stress_inline, false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment