This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][PATCH]: Improvements to sched-deps.c interface
- From: Maxim Kuvyrkov <maxim at codesourcery dot com>
- To: Roman Zippel <zippel at linux-m68k dot org>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, James E Wilson <wilson at specifix dot com>, Ayal Zaks <zaks at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org, David Edelsohn <dje at watson dot ibm dot com>, Dorit Nuzman <DORIT at il dot ibm dot com>
- Date: Wed, 22 Aug 2007 18:01:13 +0400
- Subject: Re: [PING][PATCH]: Improvements to sched-deps.c interface
- References: <461F2975.90204@ispras.ru> <4667BA2E.6090206@ispras.ru> <4671B594.9080304@redhat.com> <4687F054.8060404@codesourcery.com> <46C148EA.4020601@codesourcery.com> <Pine.LNX.4.64.0708221406360.1820@scrub.home>
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)