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]

Re: [PING][PATCH]: Improvements to sched-deps.c interface


Roman Zippel wrote:
Hi,

On Tue, 14 Aug 2007, Maxim Kuvyrkov wrote:

I successfully tested (bootstrap + regtest) the patch on ia64-linux-gnu,
ppc64-linux-gnu (normal and with '-fmodulo-sched
-fmodulo-sched-allow-regmoves' set to 1 in common.opt) and x86_64-linux-gnu.

It breaks bootstrap on all ports where INSN_SCHEDULING isn't defined:

Yes, sorry about that. I only cross-compiled to those targets.


The attached is patch that fixes warnings. Jim, Vladimir, ok to commit?

Besides warnings in sched-deps.c I also spotted an 'uninitialized use' warning in tree-vect-transform.c, the patch also fixes that. Dorit, ok to commit?

--
Maxim

2007-08-22  Maxim Kuvyrkov  <maxim@codesourcery.com>

	* sched-deps.c (update_dep): Mark arguments with ATTRIBUTE_UNUSED.
	(sched_analyze_insn): Don't postprocess speculative dependencies when
	target has no scheduling.
	* tree-vect-transform.c (vect_estimate_min_profitable_iters): Fix
	'uninitialized' warning.
Index: gcc/sched-deps.c
===================================================================
--- gcc/sched-deps.c	(revision 127704)
+++ gcc/sched-deps.c	(working copy)
@@ -943,7 +943,9 @@ change_spec_dep_to_hard (sd_iterator_def
    data-speculative dependence should be updated.  */
 static enum DEPS_ADJUST_RESULT
 update_dep (dep_t dep, dep_t new_dep,
-	    sd_iterator_def sd_it, rtx mem1, rtx mem2)
+	    sd_iterator_def sd_it ATTRIBUTE_UNUSED,
+	    rtx mem1 ATTRIBUTE_UNUSED,
+	    rtx mem2 ATTRIBUTE_UNUSED)
 {
   enum DEPS_ADJUST_RESULT res = DEP_PRESENT;
   enum reg_note old_type = DEP_TYPE (dep);
@@ -2199,6 +2201,7 @@ sched_analyze_insn (struct deps *deps, r
   if (SCHED_GROUP_P (insn))
     fixup_sched_groups (insn);
 
+#ifdef INSN_SCHEDULING
   if ((current_sched_info->flags & DO_SPECULATION)
       && !sched_insn_is_legitimate_for_speculation_p (insn, 0))
     /* INSN has an internal dependency (e.g. r14 = [r14]) and thus cannot
@@ -2211,6 +2214,7 @@ sched_analyze_insn (struct deps *deps, r
 	   sd_iterator_cond (&sd_it, &dep);)
 	change_spec_dep_to_hard (sd_it);
     }
+#endif
 }
 
 /* Analyze every insn between HEAD and TAIL inclusive, creating backward
Index: gcc/tree-vect-transform.c
===================================================================
--- gcc/tree-vect-transform.c	(revision 127704)
+++ gcc/tree-vect-transform.c	(working copy)
@@ -124,7 +124,7 @@ vect_estimate_min_profitable_iters (loop
   basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
   int nbbs = loop->num_nodes;
   int byte_misalign;
-  int innerloop_iters, factor;
+  int innerloop_iters = 0, factor;
 
   /* Cost model disabled.  */
   if (!flag_vect_cost_model)

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