On Wed, Dec 21, 2016 at 02:47:49PM -0700, Jeff Law wrote: > It looks like you could avoid a lot of work in pass_post_ipa_warn::execute > by checking if warnings were asked for outside the main loop. Presumably > you wrote this with the check inside the loop with the expectation that > other warnings might move into this routine, right?
I had it in mind for the -Walloc-zero warning, yes. And the gate checks whether the warnings are requested: + virtual bool gate (function *) { return warn_nonnull != 0; } If we add further warnings to this pass, they would be added to the main loop and gate. > Also in pass_post_ipa_warn::execute, the BITMAP_FREE call is technically in > a correct position, but it might be more maintainable long term if the > allocation/deallocation occur at the same nesting level. The only case where it makes a difference is where the bitmap is NULL and there is nothing to free (and that is the common case). > OK as-is or with the BITMAP_FREE call moved to the same scoping level as > get_nonnull_args. Thanks. Jakub