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]

[CFG] unrolling heuristic tweek



Mon May  6 18:09:58 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* params.def (PARAM_MAX_UNROLL_TIMES): set to 8
	* unroll-new.c (unroll_or_peel_loop): Disable peeling when number
	of iterations is unknown.

Index: params.def
===================================================================
RCS file: /cvs/gcc/egcs/gcc/params.def,v
retrieving revision 1.11.2.9
diff -c -3 -p -r1.11.2.9 params.def
*** params.def	1 May 2002 20:45:34 -0000	1.11.2.9
--- params.def	6 May 2002 15:58:29 -0000
*************** DEFPARAM(PARAM_MAX_UNROLLED_INSNS,
*** 152,158 ****
  DEFPARAM(PARAM_MAX_UNROLL_TIMES,
  	"max-unroll-times",
  	"The maximum number of unrollings of a single loop",
! 	4)
  /* The maximum number of insns of a peeled loop.  */
  DEFPARAM(PARAM_MAX_PEELED_INSNS,
  	"max-peeled-insns",
--- 152,158 ----
  DEFPARAM(PARAM_MAX_UNROLL_TIMES,
  	"max-unroll-times",
  	"The maximum number of unrollings of a single loop",
! 	16)
  /* The maximum number of insns of a peeled loop.  */
  DEFPARAM(PARAM_MAX_PEELED_INSNS,
  	"max-peeled-insns",
*************** DEFPARAM(PARAM_MAX_PEELED_INSNS,
*** 162,168 ****
  DEFPARAM(PARAM_MAX_PEEL_TIMES,
  	"max-peel-times",
  	"The maximum number of peelings of a single loop",
! 	15)
  /* The maximum number of insns of an unswitched loop.  */
  DEFPARAM(PARAM_MAX_UNSWITCH_INSNS,
  	"max-unswitch-insns",
--- 162,168 ----
  DEFPARAM(PARAM_MAX_PEEL_TIMES,
  	"max-peel-times",
  	"The maximum number of peelings of a single loop",
! 	16)
  /* The maximum number of insns of an unswitched loop.  */
  DEFPARAM(PARAM_MAX_UNSWITCH_INSNS,
  	"max-unswitch-insns",
Index: unroll-new.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Attic/unroll-new.c,v
retrieving revision 1.1.2.25
diff -c -3 -p -r1.1.2.25 unroll-new.c
*** unroll-new.c	6 May 2002 13:42:12 -0000	1.1.2.25
--- unroll-new.c	6 May 2002 15:58:31 -0000
*************** unroll_or_peel_loop (loops, loop, flags)
*** 1142,1147 ****
--- 1142,1157 ----
  	  flags &= ~(UAP_UNROLL | UAP_UNROLL_ALL);
  	}
      }
+   else
+     {
+       /* For now we have no good heuristics to decide whether loop peeling
+          will be effective, so disable it.  */
+       if ((flags & UAP_PEEL) && rtl_dump_file)
+ 	fprintf (rtl_dump_file,
+ 		 ";; Not peeling loop, no evidence it will be profitable\n",
+ 		 niter, npeel);
+       flags &= ~UAP_PEEL;
+     }
  
    /* We might have lost simpleness when counting loop iterations.  */
    if (!simple && !(flags & UAP_UNROLL_ALL))


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