[patch][commit] Fix store-motion.c

Steven Bosscher stevenb.gcc@gmail.com
Thu Dec 24 16:24:00 GMT 2009


Hi,

I have commited the attached patch as obvious, after bootstrap+regtest
on ia64-unknown-linux-gnu. The problem is that the regs_set_in_block
set wasn't cleared before processing a basic block. So the set starts
as uninitialized memory, and records registers set in all blocks. With
this patch, I still cannot bootstrap on ia64 with -fgcse-sm store
motion enabled, but at least I get fewer test suite failures.

Ciao!
Steven


Index: store-motion.c
===================================================================
--- store-motion.c      (revision 155453)
+++ store-motion.c      (working copy)
@@ -1067,6 +1067,8 @@ build_store_vectors (void)

   FOR_EACH_BB (bb)
     {
+      memset (regs_set_in_block, 0, sizeof (int) * max_gcse_regno);
+
       FOR_BB_INSNS (bb, insn)
        if (INSN_P (insn))
          {
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 155453)
+++ ChangeLog   (working copy)
@@ -1,3 +1,8 @@
+2009-12-24  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * store-motion.c (build_store_vectors): Clear regs_set_in_block at
+       the start of a loop over basic blocks.
+
 2009-12-24  Julian Brown  <julian@codesourcery.com>
             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

stevenb@iowa:~/devel/trunk/gcc$



More information about the Gcc-patches mailing list