PR target/39361

Jan Hubicka hubicka@ucw.cz
Sun Mar 8 15:35:00 GMT 2009


> On Sun, Mar 8, 2009 at 2:37 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > the problem is that my patch to disable SSA substitutions in inliner for
> > debug info at -O0 was bit overactive wrt always_inline functions with
> > const arguments where we need substitution to be done in order to be
> > able to use them for calling builtins requiring compile time constants
> > as arguments.
> >
> > Bootstrapped/regtested x86_64-linux, OK?
> 
> Ok.
> 
> I wonder if it is enough though.

We the first conditional in setup_one_parameter does constant
substitution on non-SSA PARAM_DECL for gimple_min_invariant only
excluding some ADDR_EXPRs (I don't quite follow why)
Now we also do substitution for SSA PARAM_DECL for all
gimple_min_invariants.
So we ought to take care of all cases we handled previously.
Naturally we break if inline function with const parameter call inline
function with const parameter calling builtin requiring constant.
We never handled this correctly as far as I remember though, with SSA
expansion we can do better here looking for the actual constant in SSA
graph and avoiding substitution here completely.

Honza



More information about the Gcc-patches mailing list