SPECfp2000's APSI hits RTL flag checking.

Jim Wilson wilson@redhat.com
Tue May 21 16:59:00 GMT 2002


>So somewhere this array must have been filled incorrectly - but where ?

The immediately previous set is here:
integrate.c:  map->x_regno_reg_rtx = inl_f->emit->x_regno_reg_rtx;

This is putting regno_reg_rtx[] of the inline function into map, for use
during inlining.  See the definition of regno_reg_rtx[] in function.h.
regno_reg_rtx[] of the inline function was set when RTL was generated for
the inline function.   This probably happened via a mark_reg_pointer call
somewhere during RTL generation.

It seems curious that the code is using x_regno_reg_rtx anyways.  Why doesn't
the code just use REG_POINTER (orig) which is faster and more obvious?  This
might be an oversight from when the code was originally written, since
REG_POINTER got introduced as a rewrite of the previous code for tracking
this info.  If we don't need x_regno_reg_rtx, we can simplify the inlining
code a little.  We can get rid of that field in the inline_map struct.

If there is some reason why we need to keep it, then I'd look for memory
corruption problems.  Maybe the inline function's regno_reg_rtx was
accidentally freed somewhere and got reused.  Or maybe it needs to be marked
as a ggc root.  If the inl_f->emit->x_regno_reg_rtx[regno] value correct
when function inlining starts?

Jim



More information about the Gcc-bugs mailing list