public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Richard Guenther" <richard.guenther@gmail.com>
To: "trevor_smigiel@playstation.sony.com"
	<trevor_smigiel@playstation.sony.com>
Cc: "Tehila Meyzels" <TEHILA@il.ibm.com>,
	gcc-patches@gcc.gnu.org,  	gcc@gcc.gnu.org,
	"Michael Matz" <matz@suse.de>,
	 	"Devang Patel" <dpatel@il.ibm.com>,
	 	"Dorit Nuzman" <dorit@il.ibm.com>,
	"Ayal Zaks" <zaks@il.ibm.com>
Subject: Re: [RFC] Improve Tree-SSA if-conversion - convergence of efforts
Date: Thu, 13 Sep 2007 09:24:00 -0000	[thread overview]
Message-ID: <84fc9c000709130224n6529d222v5c48d80be98a8394@mail.gmail.com> (raw)
In-Reply-To: <20070912214828.GI22763@playstation.sony.com>

On 9/12/07, trevor_smigiel@playstation.sony.com
<trevor_smigiel@playstation.sony.com> wrote:
> Tehila asked me a while ago to comment based on my experience with the
> RTL if convert pass and the discussions some of us had at the GCC
> summit.  Sorry it took me so long to respond.
>
> The target I care about (Cell SPU) has some things that make an
> aggressive if convert very useful and profitable.  It has conditional
> moves for every mode (there is a single, unified register file), never
> traps on illegal addresses (addresses always wrap to the 256KB address
> space), and branches are expensive (there is no hardware cache).
>
> The main limitation with the RTL if-convert pass is that it only
> recognizes specific patterns.  It is easy to write a complicated if
> statement (just using normal C with &&/||) that would never get
> converted because it ends up with basic blocks that have many in edges
> that if-convert generally doesn't handle.   (In our internal tree we
> modified the RTL pass to handle some cases of multiple in-edges, and can
> handle any number of insns in a basic block.)
>
> I haven't looked at the tree-SSA if-convert code yet, but based on what
> was described to me at the summit it seemed to be taking the same
> approach as the RTL pass.  Recognize certain patterns and convert it.
>
> I would like to see an approach that is able to take an arbitrary flow
> graph without backedges and convert it to straight line code, limited
> only by the cost model and impossible cases (e.g., inline asm).

We now have (yet another) pass that looks at multiple basic blocks
to catch if-conversion opportunities in &&/|| sequences,
tree-ssa-ifcombine.c, which of course also handles certain special
patterns.  There is also some old patches of mine attached to PR22568
to improve RTL ifcvt to handle multi-basic-block conditional move
sequences.

Richard.

  reply	other threads:[~2007-09-13  9:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-31 13:46 Tehila Meyzels
2007-07-31 15:01 ` Daniel Berlin
2007-07-31 15:06   ` Michael Matz
2007-08-06 12:16     ` Tehila Meyzels
2007-08-06 14:31       ` Michael Matz
2007-08-01 11:02   ` Tehila Meyzels
2007-08-01 15:27     ` Daniel Berlin
2007-08-01 18:52       ` Ayal Zaks
2007-08-01 19:59         ` Daniel Berlin
2007-09-12 21:48 ` trevor_smigiel
2007-09-13  9:24   ` Richard Guenther [this message]
2007-09-13  9:58   ` Michael Matz

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=84fc9c000709130224n6529d222v5c48d80be98a8394@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=TEHILA@il.ibm.com \
    --cc=dorit@il.ibm.com \
    --cc=dpatel@il.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=trevor_smigiel@playstation.sony.com \
    --cc=zaks@il.ibm.com \
    /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).