diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-06-16 17:35:24 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2012-06-16 17:35:24 -0400 |
commit | e327fd94f3be22d9129b252102e73b5bfb3b3276 (patch) | |
tree | 4e2f178bd467fda1ffce236e40bb112db94dd133 /util.c | |
parent | 15e96a558baf007966f80d565f50f18cd2ecd75d (diff) |
Remove redundant loads
Do breadth first of the entire program when marking variables used/unused
Don't optimize away unused function parameters
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -455,3 +455,15 @@ report_error (const char *fmt, ...) return FALSE; } + +void +program_breadth_first (ast_program_t *program, + node_callback_t callback, + gpointer data) +{ + int i; + + node_breadth_first (program->enter, callback, data); + for (i = 0; program->functions[i]; ++i) + node_breadth_first (program->functions[i]->enter, callback, data); +} |