public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@porcupine.cygnus.com>
To: Joern Rennecke <joern.rennecke@superh.com>
Cc: tm <tm@mail.kloo.net>, kkojima@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: PATCH: reorg branch displacement fix
Date: Fri, 01 Nov 2002 14:49:00 -0000	[thread overview]
Message-ID: <200211012300.gA1N0BSM031596@porcupine.cygnus.com> (raw)
In-Reply-To: Your message of "Fri, 01 Nov 2002 22:13:03 GMT." <3DC2FC6F.D75062A5@superh.com>

In message <3DC2FC6F.D75062A5@superh.com>, Joern Rennecke writes:
 >> > * reorg.c (relax_delay_slots): Don't thread conditional jump
 >> > through unconditional jump if the conditional jump can't reach
 >> > the branch target on this processor target.
 >> This is wrong.  reorg does not and should not be checking branch displaceme
 >nts.
 >> That is a problem for shorten-branches and the backend.
 >
 >The SH does some early branch shortening in machine_dependent_reorg because
 >a long conditional branch has to be split into a short conditional branch
 >around an unconditional branch, or a short conditional branch to an unconditi
 >onal
 >branch (that might have been inserted elsewhere after an inverted condbranch)
 >.
 >Unconditional branches have mandatory delay slots, so we get additional
 >delay slots exposed by doing this splitting before reorg, and the conditional
 >branches have optional delay slots, which obviously can't be used in the same
 >way when the branch is reversed or redirected.
 >Thus, machine_dependent_reorg already makes sure all the conditional branches
 >that need splitting are split.  If reorg redirects conditional branches
 >willy-nilly, it destroys the very data it is supposed to operate on.
Regardless, reorg has never been designed to deal with this issue.  It can
lengthen the distance between branches in various ways other than simple
redirection.

This is _NOT_ reorg's problem to solve.  This is the backend's problem to
solve.

jeff

  reply	other threads:[~2002-11-01 22:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-01 14:13 Joern Rennecke
2002-11-01 14:49 ` Jeff Law [this message]
2002-11-01 14:52   ` tm
2002-11-01 15:21   ` Joern Rennecke
2002-11-01 15:37     ` Jeff Law
2002-11-01 14:51 ` tm
2002-11-01 15:05   ` Jeff Law
2002-11-04 15:16     ` Joern Rennecke
2002-11-04 17:40       ` Hans-Peter Nilsson
2002-11-05 11:45 ` tm
2002-11-06 12:18   ` Joern Rennecke
  -- strict thread matches above, loose matches on Subject: below --
2002-10-31 15:25 tm
2002-11-01  6:34 ` Jeff Law
2002-11-01 11:35   ` tm
2002-11-03 12:34     ` Jeff Law
2002-11-01 14:55   ` tm
2002-11-01 15:07     ` Jeff Law

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=200211012300.gA1N0BSM031596@porcupine.cygnus.com \
    --to=law@porcupine.cygnus.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joern.rennecke@superh.com \
    --cc=kkojima@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=tm@mail.kloo.net \
    /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).