public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Loop IM cost TLC
Date: Thu, 20 Oct 2011 08:20:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.00.1110200950050.26779@zhemvz.fhfr.qr> (raw)


We've got new tree codes, the following makes Loop IM cost
consider those expensive that make sense.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2011-10-19  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-loop-im.c (stmt_cost): Add WIDEN_*, FMA_EXPR
	and rotates to the set of expensive operations.

Index: gcc/tree-ssa-loop-im.c
===================================================================
*** gcc/tree-ssa-loop-im.c	(revision 180191)
--- gcc/tree-ssa-loop-im.c	(working copy)
*************** stmt_cost (gimple stmt)
*** 549,554 ****
--- 549,559 ----
    switch (gimple_assign_rhs_code (stmt))
      {
      case MULT_EXPR:
+     case WIDEN_MULT_EXPR:
+     case WIDEN_MULT_PLUS_EXPR:
+     case WIDEN_MULT_MINUS_EXPR:
+     case DOT_PROD_EXPR:
+     case FMA_EXPR:
      case TRUNC_DIV_EXPR:
      case CEIL_DIV_EXPR:
      case FLOOR_DIV_EXPR:
*************** stmt_cost (gimple stmt)
*** 565,570 ****
--- 570,578 ----
  
      case LSHIFT_EXPR:
      case RSHIFT_EXPR:
+     case WIDEN_LSHIFT_EXPR:
+     case LROTATE_EXPR:
+     case RROTATE_EXPR:
        cost += 20;
        break;
  

                 reply	other threads:[~2011-10-20  7:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.LNX.2.00.1110200950050.26779@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@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).