public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: rep.dot.nop@gmail.com, gcc-patches@gcc.gnu.org,
	Bernhard Reutner-Fischer <aldot@gcc.gnu.org>,
	gfortran ML <fortran@gcc.gnu.org>
Subject: Re: [PATCH 1/2] symtab: also change RTL decl name
Date: Sun, 19 Feb 2023 03:29:43 +0100	[thread overview]
Message-ID: <20230219032943.4f3a2b67@nbbrfq> (raw)
In-Reply-To: <Y3y4WSs/I8YY5s5N@kam.mff.cuni.cz>

On Tue, 22 Nov 2022 12:54:01 +0100
Jan Hubicka <hubicka@ucw.cz> wrote:

> > > I am not quite sure how safe this is.  We generally produce DECL_RTL
> > > when we produce assembly file.  So if DECL_RTL is set then we probably
> > > already output the original function name and it is too late to change
> > > it.  
> > 
> > AFAICS we make_decl_rtl in the fortran FE in trans_function_start.  
> 
> I see, it may be a relic of something that is no longer necessary.  Can
> you see why one needs DECL_RTL so early?

No.

I think this is a ward, isn't it.

diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index ff64588b9a8..a801e66fb11 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -2922,7 +2922,7 @@ trans_function_start (gfc_symbol * sym)
     }
 
   /* Create RTL for function definition.  */
-  make_decl_rtl (fndecl);
+  //make_decl_rtl (fndecl);
 
   allocate_struct_function (fndecl, false);

But we have that alot, with varous workarounds near
lhd_set_decl_assembler_name.
gcc.gnu.org/pr94223 comes to mind, but that was counters.
But i've seen in C++ too that there are GC dangles like here.

5f3682ffcef162363b783eb9ee702debff489fa8 a.k.a
https://gcc.gnu.org/legacy-ml/gcc-patches/2017-11/msg01340.html

ah lhd_overwrite_decl_assembler_name.

So.. why do we have that, again?
Per default it doesn't look much if there are clones or an ifunc
dispatcher, does it.

  reply	other threads:[~2023-02-19  2:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09 19:02 [PATCH 0/2] Fortran: add attribute target_clones Bernhard Reutner-Fischer
2022-11-09 19:02 ` [PATCH 1/2] symtab: also change RTL decl name Bernhard Reutner-Fischer
2022-11-17  8:02   ` Bernhard Reutner-Fischer
2022-11-21 18:24     ` Mikael Morin
2022-11-21 19:02     ` Jan Hubicka
2022-11-21 19:47       ` Bernhard Reutner-Fischer
2022-11-22 11:54         ` Jan Hubicka
2023-02-19  2:29           ` Bernhard Reutner-Fischer [this message]
2023-02-19  2:49             ` Bernhard Reutner-Fischer
2022-11-09 19:02 ` [PATCH 2/2] Fortran: add attribute target_clones Bernhard Reutner-Fischer
2022-11-21 19:13   ` Mikael Morin
2022-11-21 22:26     ` Bernhard Reutner-Fischer
2022-11-22 13:17       ` Mikael Morin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230219032943.4f3a2b67@nbbrfq \
    --to=rep.dot.nop@gmail.com \
    --cc=aldot@gcc.gnu.org \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).