reworked AST optimizers analysis of side effects during aggregate operations & calls

This commit is contained in:
Vern Paxson 2023-12-04 16:55:38 -08:00
parent c028901146
commit 740a087765
13 changed files with 1119 additions and 223 deletions

View file

@ -5,6 +5,7 @@
#pragma once
#include "zeek/Event.h"
#include "zeek/script_opt/ProfileFunc.h"
#include "zeek/script_opt/UseDefs.h"
#include "zeek/script_opt/ZAM/ZBody.h"
@ -23,8 +24,6 @@ class Stmt;
class SwitchStmt;
class CatchReturnStmt;
class ProfileFunc;
using InstLabel = ZInstI*;
// Class representing a single compiled statement. (This is different from,
@ -53,7 +52,7 @@ public:
class ZAMCompiler {
public:
ZAMCompiler(ScriptFunc* f, std::shared_ptr<ProfileFunc> pf, ScopePtr scope, StmtPtr body,
ZAMCompiler(ScriptFunc* f, ProfileFuncs& pfs, std::shared_ptr<ProfileFunc> pf, ScopePtr scope, StmtPtr body,
std::shared_ptr<UseDefs> ud, std::shared_ptr<Reducer> rd);
~ZAMCompiler();
@ -503,6 +502,7 @@ private:
std::vector<const NameExpr*> retvars;
ScriptFunc* func;
ProfileFuncs& pfs;
std::shared_ptr<ProfileFunc> pf;
ScopePtr scope;
StmtPtr body;