On Mon, Jan 9, 2023 at 10:58 AM Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Mon, Jan 09, 2023 at 09:05:26AM +0100, Richard Biener wrote:
> > On Wed, Jan 4, 2023 at 9:54 AM Jose E. Marchesi via Gcc-patches
> > <gcc-patches@gcc.gnu.org> wrote:
> > >
> > >
> > > ping.
> > > Would this be a good approach for fixing the issue?
> >
> > adding the is_libcall bit enlarges rtx_def by 8 bytes - there's no room for 
> > more
> > bits here.
>
> That is obviously not the way to go, sure.
>
> > I really wonder how other targets avoid the issue you are pointing out?
> > Do their assemblers prune unused (extern) .global?
>
> I think no target solves this, if they see an extern call during expansion
> and emit some directive for those, they emit the global or whatever directive
> which remains there.
>
> If all bits for CALL_INSN are taken, can't we add a flag on the CALL
> rtx inside of the CALL_INSN pattern?  Or a flag on the SYMBOL_REF inside of
> it (libcalls are always direct calls, aren't they) or SYMBOL_REF_FLAGS ?

I suppose the SYMBOL_REF would be what I'd target here.  Note we already
have

/* 1 if RTX is a symbol_ref that has been the library function in
   emit_library_call.  */
#define SYMBOL_REF_USED(RTX)                                            \
  (RTL_FLAG_CHECK1 ("SYMBOL_REF_USED", (RTX), SYMBOL_REF)->used)

so can't we just use that during the final scan for the delayed assembling?

>
>         Jakub
>

Reply via email to