mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
speed up ZAM compilation by capping function size when inlining
This commit is contained in:
parent
0c2f04548a
commit
7d00ce0082
13 changed files with 79 additions and 14 deletions
|
@ -27,8 +27,8 @@ public:
|
|||
Analyze();
|
||||
}
|
||||
|
||||
// Either returns the original CallExpr if it's not inline-able,
|
||||
// or an InlineExpr if it is.
|
||||
// Either returns the original CallExpr if it's not inline-able;
|
||||
// or an InlineExpr if it is; or nil if further inlining should stop.
|
||||
ExprPtr CheckForInlining(CallExprPtr c);
|
||||
|
||||
// True if the given function has been inlined.
|
||||
|
@ -57,6 +57,12 @@ protected:
|
|||
// prior to increasing it to accommodate inlining.
|
||||
int curr_frame_size;
|
||||
|
||||
// The number of statements and expressions in the function being
|
||||
// inlined. Dynamically updated as the inlining proceeds. Used
|
||||
// to cap inlining complexity.
|
||||
int num_stmts;
|
||||
int num_exprs;
|
||||
|
||||
// Whether to generate a report about functions either directly and
|
||||
// indirectly recursive.
|
||||
bool report_recursive;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue