This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix how block_split sets the irreducible flag on bbs and edges
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Zdenek Dvorak" <rakdver at kam dot mff dot cuni dot cz>, "Richard Guenther" <rguenther at suse dot de>
- Date: Mon, 3 Nov 2008 09:46:59 -0600
- Subject: [patch] Fix how block_split sets the irreducible flag on bbs and edges
Hi,
Here is a fix that passed regstrap on amd64-linux for correctly
setting the irreducible loop flags on basic blocks and on edges.
This occurs quite frequently with -fgraphite in the spec.
Okay for trunk?
Thanks,
Sebastian Pop
--
AMD - GNU Tools
---------- Forwarded message ----------
From: <spop@gcc13.fsffrance.org>
Date: Mon, Nov 3, 2008 at 3:59 AM
Subject: [regtest] Results for 2008_11_03_03_48_14_irred_flag.diff on
x86_64-unknown-linux-gnu
To: sebpop@gmail.com
(cat /home/spop/state/testing/patched/report
there are no regressions with your patch.
tac)
FAILs with patched version:
(cat /home/spop/state/testing/patched/failed
gcc.sum gcc.dg/tree-prof/bb-reorg.c
gcc.sum gcc.dg/tree-prof/pr34999.c
gcc.sum gcc.dg/vect/no-scevccp-outer-13.c
gcc.sum gcc.dg/vect/no-scevccp-outer-7.c
gcc.sum gcc.dg/vect/vect-67.c
gcc.sum gcc.target/i386/pr34256.c
g++.sum g++.old-deja/g++.mike/warn1.C
libmudflap.sum libmudflap.c++/pass41-frag.cxx
libstdc++.sum 22_locale/time_get/get_date/wchar_t/4.cc
tac)
FAILs with pristine version:
(cat /home/spop/state//trunk/141542/failed
gcc.sum gcc.dg/tree-prof/bb-reorg.c
gcc.sum gcc.dg/tree-prof/pr34999.c
gcc.sum gcc.dg/vect/no-scevccp-outer-13.c
gcc.sum gcc.dg/vect/no-scevccp-outer-7.c
gcc.sum gcc.dg/vect/vect-67.c
gcc.sum gcc.target/i386/pr34256.c
g++.sum g++.old-deja/g++.mike/warn1.C
libmudflap.sum libmudflap.c++/pass41-frag.cxx
libstdc++.sum 22_locale/time_get/get_date/wchar_t/4.cc
tac)
The files used for the validation of your patch are stored in
/home/spop/state/patched/2008_11_03_09_59_16 on the tester machine.
email:sebpop@gmail.com
branch:trunk
revision:HEAD
configure:
make:
check:
Index: gcc/cfghooks.c
===================================================================
--- gcc/cfghooks.c (revision 141467)
+++ gcc/cfghooks.c (working copy)
@@ -425,6 +425,7 @@ edge
split_block (basic_block bb, void *i)
{
basic_block new_bb;
+ edge res;
if (!cfg_hooks->split_block)
internal_error ("%s does not support split_block", cfg_hooks->name);
@@ -450,7 +451,15 @@ split_block (basic_block bb, void *i)
bb->loop_father->latch = new_bb;
}
- return make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
+ res = make_single_succ_edge (bb, new_bb, EDGE_FALLTHRU);
+
+ if (bb->flags & BB_IRREDUCIBLE_LOOP)
+ {
+ new_bb->flags |= BB_IRREDUCIBLE_LOOP;
+ res->flags |= EDGE_IRREDUCIBLE_LOOP;
+ }
+
+ return res;
}
/* Splits block BB just after labels. The newly created edge is returned. */