[patch] Record REG_POINTER in more cases
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Fri Oct 17 20:00:00 GMT 2003
Hello,
> On Sun, Oct 12, 2003 at 09:52:49PM +0200, Zdenek Dvorak wrote:
> > * emit-rtl.c (set_mem_attributes_minus_bitpos): Set MEM_POINTER
> > flag.
> > * explow.c (force_not_mem): Set REG_POINTER flag according to
> > MEM_POINTER one.
> > * rtl.h (MEM_POINTER): New macro.
>
> It'd be nice to have a test case for which this matters.
I found it when analysing gap from spec2000 benchmark; concretely
in this function
TypHandle EvVar ( hdVar )
TypHandle hdVar;
{
if ( ((TypHandle*)((hdVar)->ptr))[0] == 0 )
return Error("Variable: '%s' must have a value",
(long)(((TypHandle*)((hdVar)->ptr))+1), 0L );
return ((TypHandle*)((hdVar)->ptr))[0];
}
the if is not predicted by pointer heuristics without this patch.
Zdenek
More information about the Gcc-patches
mailing list