Commit c98fed4c authored by georgia.kouveli's avatar georgia.kouveli Committed by Commit bot

[turbofan] Add option to filter --print-opt-code.

BUG=

Review-Url: https://codereview.chromium.org/2375933003
Cr-Commit-Position: refs/heads/master@{#39837}
parent 21e46b05
......@@ -146,7 +146,8 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
isolate->bootstrapper()->IsActive()
? FLAG_print_builtin_code
: (FLAG_print_code || (info->IsStub() && FLAG_print_code_stubs) ||
(info->IsOptimizing() && FLAG_print_opt_code));
(info->IsOptimizing() && FLAG_print_opt_code &&
info->shared_info()->PassesFilter(FLAG_print_opt_code_filter)));
if (print_code) {
std::unique_ptr<char[]> debug_name = info->GetDebugName();
CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer());
......
......@@ -1124,6 +1124,7 @@ DEFINE_BOOL(test_primary_stub_cache, false,
// codegen-ia32.cc / codegen-arm.cc
DEFINE_BOOL(print_code, false, "print generated code")
DEFINE_BOOL(print_opt_code, false, "print optimized code")
DEFINE_STRING(print_opt_code_filter, "*", "filter for printing optimized code")
DEFINE_BOOL(print_unopt_code, false,
"print unoptimized code before "
"printing optimized code based on it")
......
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