[patch] Fix speculative prefetch profiler bug

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Sat Sep 11 15:25:00 GMT 2004


Hello,

> >This patch fixes a problem with the speculative prefetch value 
> >profiler.  If the instruction stream contains
> >an instruction like the following,
> >
> >   (insn 633 621 84  my-file.c:184 (clobber (mem:BLK (scratch) [0 
> >A8])) -1 (ni) nil))
> >
> >the value profiler notices that it is an instruction that writes to 
> >memory, and decides to try to profile it.
> >Eventually  the register "(scratch)" gets passed into 
> >int_mode_for_mode (through rtl_gen_const_delta_profiler and 
> >convert_move), with VOIDmode, which causes an internal error.
> >
> >It seems to me that instructions of this particular form should really 
> >not be of interest to the
> >speculative prefetch value profiler, so the following patch tells it 
> >not to profile such instructions, which
> >solves the problem.  (If anyone believes there is a better approach to 
> >take, please let me know).
> 
> I think you could disable looking at all CLOBBERs.
> This appears to have been introduced by Zdenek on 9/1, perhaps he has a 
> comment.

I also think ignoring all CLOBBERs is the right way.

Zdenek



More information about the Gcc-patches mailing list