skip optimization of functions with AST nodes unknown to script optimization

This commit is contained in:
Vern Paxson 2024-11-29 16:12:05 -08:00
parent a2a47ba334
commit 35e157a0ab
7 changed files with 148 additions and 9 deletions

View file

@ -263,6 +263,11 @@ extern void clear_script_analysis();
// Called when Zeek is terminating.
extern void finish_script_execution();
// Returns true if the given profile indicates the presence of an AST
// node not known to script optimization. The second argument specifies
// whether we're doing ZAM optimization; if not, compile-to-C++ is assumed.
extern bool has_AST_node_unknown_to_script_opt(const ProfileFunc* prof, bool /* is_ZAM */);
// Returns true if the given call has a specialized ZAM equivalent when
// used in a conditional.
extern bool IsZAM_BuiltInCond(const CallExpr* c);