On Mon, Nov 20, 2017 at 02:25:35PM -0700, Martin Sebor wrote:
> On 11/20/2017 02:14 PM, Jakub Jelinek wrote:
> > Hi!
> > 
> > All the hash_maps in tree-ssa-strlen.c except for the newly added one
> > were pointers to hash maps, which were constructed either lazily or during
> > the pass.  But strlen_to_stridx is now constructed at the compiler start,
> > which is something I'd prefer to avoid, it affects even -O0 that way and
> > empty/small file compilation, something e.g. the kernel folks care so much
> > about.
> > 
> > Apparently the hash map is only needed when one of the two warnings
> > is enabled, so this patch initializes it only in that case and otherwise
> > doesn't fill it or query it.
> 
> This same change is also in the latest patch I posted for 82945
> just yesterday:
> 
>   https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01670.html

Oops, sorry for missing that.  But you still initialize it unconditionally
in the pass and compute it even when it is only needed for the warning.

        Jakub

Reply via email to