public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Loop IM cost TLC
@ 2011-10-20  8:20 Richard Guenther
  0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2011-10-20  8:20 UTC (permalink / raw)
  To: gcc-patches


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;
  

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-10-20  7:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-20  8:20 [PATCH] Loop IM cost TLC Richard Guenther

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).