mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
driver class for generating RDs across an AST, and logic to invoke it
This commit is contained in:
parent
baab336d2e
commit
2f0d02c878
4 changed files with 1461 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "zeek/script_opt/ProfileFunc.h"
|
||||
#include "zeek/script_opt/Inline.h"
|
||||
#include "zeek/script_opt/Reduce.h"
|
||||
#include "zeek/script_opt/GenRDs.h"
|
||||
|
||||
|
||||
namespace zeek::detail {
|
||||
|
@ -75,6 +76,10 @@ void optimize_func(ScriptFunc* f, ProfileFunc* pf, ScopePtr scope_ptr,
|
|||
|
||||
f->ReplaceBody(body, new_body);
|
||||
body = new_body;
|
||||
body->Traverse(pf);
|
||||
|
||||
RD_Decorate reduced_rds(pf);
|
||||
reduced_rds.TraverseFunction(f, scope, body);
|
||||
|
||||
int new_frame_size =
|
||||
scope->Length() + rc->NumTemps() + rc->NumNewLocals();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue