This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] loop invariant motion expensive codes


	Tree-SSA loop invariant motion includes a list of expensive
operations that should be hoisted.  The list includes multiply and most
forms of divide, but omits FP divide.  The patch adds real division to the
list.

Bootstrapped and regression tested on powerpc-ibm-aix5.2.0.0.

Okay for mainline?

Thanks, David


	* tree-ssa-loop-im.c (stmt_cost): Add RDIV_EXPR to list of
	expensive operations.

Index: tree-ssa-loop-im.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-im.c,v
retrieving revision 2.32
diff -c -p -r2.32 tree-ssa-loop-im.c
*** tree-ssa-loop-im.c	21 Mar 2005 19:26:59 -0000	2.32
--- tree-ssa-loop-im.c	31 Mar 2005 15:09:10 -0000
*************** stmt_cost (tree stmt)
*** 436,441 ****
--- 436,442 ----
      case FLOOR_MOD_EXPR:
      case ROUND_MOD_EXPR:
      case TRUNC_MOD_EXPR:
+     case RDIV_EXPR:
        /* Division and multiplication are usually expensive.  */
        cost += 20;
        break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]