mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
enable setting "-O optimize-AST" option
This commit is contained in:
parent
56ab0ddcf1
commit
d38cc04e83
3 changed files with 15 additions and 0 deletions
|
@ -133,6 +133,7 @@ void analyze_scripts()
|
|||
check_env_opt("ZEEK_DUMP_XFORM", analysis_options.dump_xform);
|
||||
check_env_opt("ZEEK_DUMP_UDS", analysis_options.dump_uds);
|
||||
check_env_opt("ZEEK_INLINE", analysis_options.inliner);
|
||||
check_env_opt("ZEEK_OPT", analysis_options.optimize_AST);
|
||||
check_env_opt("ZEEK_XFORM", analysis_options.activate);
|
||||
|
||||
auto usage = getenv("ZEEK_USAGE_ISSUES");
|
||||
|
@ -148,6 +149,7 @@ void analyze_scripts()
|
|||
}
|
||||
|
||||
if ( analysis_options.only_func ||
|
||||
analysis_options.optimize_AST ||
|
||||
analysis_options.usage_issues > 0 )
|
||||
analysis_options.activate = true;
|
||||
|
||||
|
@ -157,6 +159,12 @@ void analyze_scripts()
|
|||
if ( ! analysis_options.activate && ! analysis_options.inliner )
|
||||
return;
|
||||
|
||||
if ( analysis_options.usage_issues > 0 && analysis_options.optimize_AST )
|
||||
{
|
||||
fprintf(stderr, "warning: \"-O optimize-AST\" option is incompatible with -u option, deactivating optimization\n");
|
||||
analysis_options.optimize_AST = false;
|
||||
}
|
||||
|
||||
// Now that everything's parsed and BiF's have been initialized,
|
||||
// profile the functions.
|
||||
std::unordered_map<const ScriptFunc*, std::shared_ptr<ProfileFunc>>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue