public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/11331] [Regression 3.4] ld: BFD 2.14.90 20030602 internal error
Date: Fri, 27 Jun 2003 01:00:00 -0000	[thread overview]
Message-ID: <20030627010017.3603.qmail@sources.redhat.com> (raw)
In-Reply-To: <20030626163810.11331.danglin@gcc.gnu.org>

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11331



------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2003-06-27 01:00 -------
Subject: Re:  [Regression 3.4] ld: BFD 2.14.90 20030602 internal error

> ------- Additional Comments From jakub at gcc dot gnu dot org  2003-06-26 20:32 -------
> Well, if you want to leave current inefficient thunk, I could certainly add
>   aname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function));
>   DECL_ATTRIBUTES (alias)
>     = build_tree_list (build_identifier ("alias"),
>                        build_tree_list (NULL,
>                                         build_string (strlen (aname) + 1,
>                                                       aname)));
> to make_alias_for_thunk and you can then look up alias attribute in pa_asm_output_thunk and call that instead of the alias. But IMHO it is better
> to just optimize the thunks.

This solution is not optimal on the PA.  After a considerable
amount of study, I have concluded that I must request that your patch
be reverted.  Placing the thunk in the same linkonce section as the
method will force us to generate a long branch to the method.  This
will cause worse code to be generated than now.

Before your patch, it was possible to use a one instruction pc-relative
branch from a thunk when the thunk could be in its own section.  If a
long branch was needed, the linker would add automatically a long branch
stub.  When you place the thunk into the same linkonce section as the
method, we can no longer be certain that a pc-relative branch will have
the range to reach its target, nor will it be guaranteed that it can reach
a long branch stub.

Placement of thunks before the method is preferable on the PA.  This
allows at least twenty thousand thunks before a long branch is needed
to reach the method.  With thunks after the method, we might need long
branches from all thunks if the method is large.

It's not clear from your original posting, but it does not appear that
your change actually provided improved code efficiency on x86 and x86_64
where it was tested.  If this is beneficial on these and other ports,
then I suggest that some additional define be required to enable
the change so that ports that would prefer the old implementation
would still have that option (I understand that this change also
likely broke the powerpc port).

Dave


  parent reply	other threads:[~2003-06-27  1:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-26 16:38 [Bug c++/11331] New: " danglin at gcc dot gnu dot org
2003-06-26 19:49 ` [Bug c++/11331] " pinskia at physics dot uc dot edu
2003-06-26 20:14 ` dave at hiauly1 dot hia dot nrc dot ca
2003-06-26 20:32 ` jakub at gcc dot gnu dot org
2003-06-27  1:00 ` dave at hiauly1 dot hia dot nrc dot ca [this message]
2003-06-27  9:36 ` jakub at gcc dot gnu dot org
2003-06-27 16:40 ` dave at hiauly1 dot hia dot nrc dot ca
2003-07-20 13:20 ` [Bug target/11331] " pinskia at physics dot uc dot edu
2003-08-04  0:45 ` pinskia at physics dot uc dot edu
2003-08-09 16:51 ` [Bug target/11331] [3.4 Regression] " pinskia at gcc dot gnu dot org
2003-08-09 19:08 ` dave at hiauly1 dot hia dot nrc dot ca
2003-08-09 19:47 ` dave at hiauly1 dot hia dot nrc dot ca
2003-08-11 15:12 ` pinskia at gcc dot gnu dot org
2003-08-11 15:21 ` pinskia at gcc dot gnu dot org

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=20030627010017.3603.qmail@sources.redhat.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).