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

@ -10,6 +10,7 @@
#include "zeek/script_opt/ProfileFunc.h"
#include "zeek/script_opt/ScriptOpt.h"
#include "zeek/script_opt/StmtOptInfo.h"
#include "zeek/script_opt/ZAM/Support.h"
namespace zeek::detail {
@ -160,7 +161,7 @@ void Inliner::Analyze() {
if ( non_recursive_funcs.count(func) == 0 )
continue;
if ( body->Tag() == STMT_CPP )
if ( ! is_ZAM_compilable(f.Profile()) )
continue;
inline_ables[func] = f.Profile();