On Mon, Oct 23, 2017 at 10:04 AM, Richard Biener <rguent...@suse.de> wrote: > On Mon, 23 Oct 2017, Jakub Jelinek wrote: > >> On Mon, Oct 23, 2017 at 09:48:50AM +0200, Richard Biener wrote: >> > > --- gcc/targhooks.c.jj 2017-10-13 19:02:08.000000000 +0200 >> > > +++ gcc/targhooks.c 2017-10-20 14:26:07.945464025 +0200 >> > > @@ -177,6 +177,14 @@ default_legitimize_address_displacement >> > > return false; >> > > } >> > > >> > > +bool >> > > +default_const_not_ok_for_debug_p (rtx x) >> > > +{ >> > > + if (GET_CODE (x) == UNSPEC) >> > >> > What about UNSPEC_VOLATILE? >> >> This hook is called on the argument of CONST or SYMBOL_REF. >> UNSPEC_VOLATILE can't appear inside of CONST, it wouldn't be CONST then. >> >> UNSPEC appearing outside of CONST is rejected unconditionally in >> mem_loc_descriptor: >> ... >> case UNSPEC: >> ... >> /* If delegitimize_address couldn't do anything with the UNSPEC, we >> can't express it in the debug info. This can happen e.g. with some >> TLS UNSPECs. */ >> break; >> and for UNSPEC_VOLATILE we just ICE, because var-tracking shouldn't let >> those through: >> default: >> if (flag_checking) >> { >> print_rtl (stderr, rtl); >> gcc_unreachable (); >> } >> break; > > Ok. The patch looks fine from a middle-end point of view.
LGTM for the x86 part. Thanks, Uros.