public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb@suse.de>
To: gcc@gcc.gnu.org
Subject: ifcvt.c question
Date: Mon, 30 May 2005 17:26:00 -0000	[thread overview]
Message-ID: <200505292323.29675.stevenb@suse.de> (raw)

Hi,

ifcvt.c has this code in find_if_block():

  2718    /* If the THEN block has no successors, conditional execution can still
  2719       make a conditional call.  Don't do this unless the ELSE block has
  2720       only one incoming edge -- the CFG manipulation is too ugly otherwise.
  2721       Check for the last insn of the THEN block being an indirect jump, which
  2722       is listed as not having any successors, but confuses the rest of the CE
  2723       code processing.  ??? we should fix this in the future.  */
  2724    if (EDGE_COUNT (then_bb->succs) == 0)
  2725      {
  2726        if (single_pred_p (else_bb))
  2727          {
  2728            rtx last_insn = BB_END (then_bb);
  2729
  2730            while (last_insn
  2731                   && NOTE_P (last_insn)
  2732                   && last_insn != BB_HEAD (then_bb))
  2733              last_insn = PREV_INSN (last_insn);
  2734
  2735            if (last_insn
  2736                && JUMP_P (last_insn)
  2737                && ! simplejump_p (last_insn))
  2738              return FALSE;
  2739
  2740            join_bb = else_bb;
  2741            else_bb = NULL_BLOCK;
  2742          }
  2743        else
  2744          return FALSE;
  2745      }
  2746

I don't understand what lines 2728 to 2741 are for.  Could someone give
an example of when we can have a then_bb that has no successors, but
still ends in something that satisfies simplejump_p()?  What kind of
strange indirect jump would that be?  And shouldn't the check just use
computed_jump_p() if that is what it is looking for??

Gr.
Steven

             reply	other threads:[~2005-05-30 15:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30 17:26 Steven Bosscher [this message]
2005-05-30 18:38 ` Roger Sayle
2009-08-10 12:53 Ramana Radhakrishnan
2009-08-10 13:25 ` Steven Bosscher
2009-08-10 15:49   ` Ramana Radhakrishnan

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=200505292323.29675.stevenb@suse.de \
    --to=stevenb@suse.de \
    --cc=gcc@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).