[Bug translator/16974] New: excessive context size after {stmt;}->stmt; optimization
fche at redhat dot com
sourceware-bugzilla@sourceware.org
Wed May 21 18:02:00 GMT 2014
https://sourceware.org/bugzilla/show_bug.cgi?id=16974
Bug ID: 16974
Summary: excessive context size after {stmt;}->stmt;
optimization
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: fche at redhat dot com
When dead_stmtexpr_remover::visit_block unwraps statements
from unnecessary { } nesting levels, it has an unintended
consequence on context memory allocation. Namely,
c_tmpcounter::visit_* only special cases the visit_block
type for special handling, wherein distinct statements
may have overlapping temporaries. So for constructs such
as
if (foo=="1") foreach (a in b) ...
else if (foo=="2") foreach (c in d) ...
else ...
all the temporary variables for all blocks (now nested
singleton statements) are expanded as siblings in the
function context struct.
Instead, all of these tree-like staptree nodes (if_statement,
for*_statement, perhaps others) should do what
c_tmpcounter::visit_block does, namely wrap individual
subtree branches into a common anonymous union {}.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list