public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/45354] [4.5/4.6 Regression] ICE: verify_flow_info failed: fallthru edge crosses section boundary (bb 6) with gcc.dg/tree-prof/update-cunroll-2.c
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-26 9:39 ` ebotcazou at gcc dot gnu.org
2010-11-29 8:26 ` [Bug rtl-optimization/45354] [4.6 regression] ICE: fallthru edge crosses section boundary (bb 6) with g++.dg/bprob/g++-bprob-1.C ebotcazou at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-26 9:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |ebotcazou at gcc dot
| |gnu.org
AssignedTo|unassigned at gcc dot |ebotcazou at gcc dot
|gnu.org |gnu.org
Known to fail| |
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-26 08:50:10 UTC ---
Investigating.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE: fallthru edge crosses section boundary (bb 6) with g++.dg/bprob/g++-bprob-1.C
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
2010-11-26 9:39 ` [Bug rtl-optimization/45354] [4.5/4.6 Regression] ICE: verify_flow_info failed: fallthru edge crosses section boundary (bb 6) with gcc.dg/tree-prof/update-cunroll-2.c ebotcazou at gcc dot gnu.org
@ 2010-11-29 8:26 ` ebotcazou at gcc dot gnu.org
2010-11-29 8:37 ` [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition ebotcazou at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 8:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|ebotcazou at gcc dot |
|gnu.org |
Known to work| |4.5.2
Host|x86_64-pc-linux-gnu |
Target Milestone|4.5.2 |4.6.0
Summary|[4.5/4.6 Regression] ICE: |[4.6 regression] ICE:
|verify_flow_info failed: |fallthru edge crosses
|fallthru edge crosses |section boundary (bb 6)
|section boundary (bb 6) |with
|with |g++.dg/bprob/g++-bprob-1.C
|gcc.dg/tree-prof/update-cun |
|roll-2.c |
Known to fail|4.5.2 |
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 07:57:40 UTC ---
update-cunroll-2.c passes on mainline and 4.5 branch. g++-bprob-1.C fails only
on the mainline.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
2010-11-26 9:39 ` [Bug rtl-optimization/45354] [4.5/4.6 Regression] ICE: verify_flow_info failed: fallthru edge crosses section boundary (bb 6) with gcc.dg/tree-prof/update-cunroll-2.c ebotcazou at gcc dot gnu.org
2010-11-29 8:26 ` [Bug rtl-optimization/45354] [4.6 regression] ICE: fallthru edge crosses section boundary (bb 6) with g++.dg/bprob/g++-bprob-1.C ebotcazou at gcc dot gnu.org
@ 2010-11-29 8:37 ` ebotcazou at gcc dot gnu.org
2010-11-29 8:38 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 8:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.6 regression] ICE: |[4.6 regression] ICE with
|fallthru edge crosses |-fselective-scheduling and
|section boundary (bb 6) |-freorder-blocks-and-partit
|with |ion
|g++.dg/bprob/g++-bprob-1.C |
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 08:24:57 UTC ---
Reduced testcase to be attached. This is selective scheduling removing a
BARRIER and a JUMP:
(note 40 41 4 6 [bb 6] NOTE_INSN_BASIC_BLOCK)
(insn 4 40 54 6 (set (reg/v:SI 65 [ result ])
(const_int 1024 [0x400])) t.c:12 64 {*movsi_internal}
(nil))
(jump_insn 54 4 55 6 (set (pc)
(label_ref 21)) t.c:12 -1
(expr_list:REG_CROSSING_JUMP (nil)
(nil))
-> 21)
(barrier 55 54 21)
(code_label 21 55 22 7 2 "" [2 uses])
(note 22 21 52 7 [bb 7] NOTE_INSN_BASIC_BLOCK)
They cannot be removed since the edge is EDGE_CROSSING.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-11-29 8:37 ` [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition ebotcazou at gcc dot gnu.org
@ 2010-11-29 8:38 ` ebotcazou at gcc dot gnu.org
2010-11-29 8:41 ` ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 8:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-29 08:26:47 UTC ---
Created attachment 22560
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22560
Reduced testcase
Compile with -O -fschedule-insns -fselective-scheduling
-freorder-blocks-and-partition -fno-inline and -fprofile-generate/-fprofile-use
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-11-29 8:38 ` ebotcazou at gcc dot gnu.org
@ 2010-11-29 8:41 ` ebotcazou at gcc dot gnu.org
2010-11-29 14:21 ` amonakov at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2010-11-29 8:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
AssignedTo|ebotcazou at gcc dot |unassigned at gcc dot
|gnu.org |gnu.org
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-11-29 8:41 ` ebotcazou at gcc dot gnu.org
@ 2010-11-29 14:21 ` amonakov at gcc dot gnu.org
2010-12-03 12:04 ` amonakov at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-11-29 14:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |amonakov at gcc dot gnu.org
|gnu.org |
--- Comment #9 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-11-29 13:58:45 UTC ---
Thanks. We go over-eager when cleaning up degenerate jumps and don't pay
attention to EDGE_CROSSING.
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 7956cd8..0adc836 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -156,6 +156,7 @@ static void move_bb_info (basic_block, basic_block);
static void remove_empty_bb (basic_block, bool);
static void sel_merge_blocks (basic_block, basic_block);
static void sel_remove_loop_preheader (void);
+static bool have_removable_jump_p (basic_block, basic_block);
static bool insn_is_the_only_one_in_bb_p (insn_t);
static void create_initial_data_sets (basic_block);
@@ -3675,7 +3676,7 @@ tidy_control_flow (basic_block xbb, bool full_tidying)
return changed;
/* Check if there is a unnecessary jump after insn left. */
- if (jump_leads_only_to_bb_p (BB_END (xbb), xbb->next_bb)
+ if (have_removable_jump_p (xbb, xbb->next_bb)
&& INSN_SCHED_TIMES (BB_END (xbb)) == 0
&& !IN_CURRENT_FENCE_P (BB_END (xbb)))
{
@@ -3716,7 +3717,7 @@ tidy_control_flow (basic_block xbb, bool full_tidying)
/* And unconditional jump in previous basic block leads to
next basic block of XBB and this jump can be safely removed. */
&& in_current_region_p (xbb->prev_bb)
- && jump_leads_only_to_bb_p (BB_END (xbb->prev_bb), xbb->next_bb)
+ && have_removable_jump_p (xbb->prev_bb, xbb->next_bb)
&& INSN_SCHED_TIMES (BB_END (xbb->prev_bb)) == 0
/* Also this jump is not at the scheduling boundary. */
&& !IN_CURRENT_FENCE_P (BB_END (xbb->prev_bb)))
@@ -6104,11 +6105,13 @@ sel_is_loop_preheader_p (basic_block bb)
return false;
}
-/* Checks whether JUMP leads to basic block DEST_BB and no other blocks. */
-bool
-jump_leads_only_to_bb_p (insn_t jump, basic_block dest_bb)
+/* Check whether JUMP_BB ends with a jump insn that leads only to DEST_BB and
+ can be removed, making the corresponding edge fallthrough (assuming that
+ all basic blocks between JUMP_BB and DEST_BB are empty). */
+static bool
+have_removable_jump_p (basic_block jump_bb, basic_block dest_bb)
{
- basic_block jump_bb = BLOCK_FOR_INSN (jump);
+ insn_t jump = BB_END (jump_bb);
/* It is not jump, jump with side-effects or jump can lead to several
basic blocks. */
@@ -6119,7 +6122,7 @@ jump_leads_only_to_bb_p (insn_t jump, basic_block
dest_bb)
/* Several outgoing edges, abnormal edge or destination of jump is
not DEST_BB. */
if (EDGE_COUNT (jump_bb->succs) != 1
- || EDGE_SUCC (jump_bb, 0)->flags & EDGE_ABNORMAL
+ || EDGE_SUCC (jump_bb, 0)->flags & (EDGE_ABNORMAL | EDGE_CROSSING)
|| EDGE_SUCC (jump_bb, 0)->dest != dest_bb)
return false;
@@ -6199,7 +6202,7 @@ sel_remove_loop_preheader (void)
basic block if it becomes empty. */
if (next_bb->prev_bb == prev_bb
&& prev_bb != ENTRY_BLOCK_PTR
- && jump_leads_only_to_bb_p (BB_END (prev_bb), next_bb))
+ && have_removable_jump_p (prev_bb, next_bb))
{
redirect_edge_and_branch (EDGE_SUCC (prev_bb, 0), next_bb);
if (BB_END (prev_bb) == bb_note (prev_bb))
diff --git a/gcc/sel-sched-ir.h b/gcc/sel-sched-ir.h
index 9ab0466..1f3dec4 100644
--- a/gcc/sel-sched-ir.h
+++ b/gcc/sel-sched-ir.h
@@ -1590,7 +1590,6 @@ extern bool sel_remove_insn (insn_t, bool, bool);
extern bool bb_header_p (insn_t);
extern void sel_init_invalid_data_sets (insn_t);
extern bool insn_at_boundary_p (insn_t);
-extern bool jump_leads_only_to_bb_p (insn_t, basic_block);
/* Basic block and CFG functions. */
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2010-11-29 14:21 ` amonakov at gcc dot gnu.org
@ 2010-12-03 12:04 ` amonakov at gcc dot gnu.org
2010-12-03 12:06 ` amonakov at gcc dot gnu.org
2011-04-07 6:58 ` abel at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-03 12:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
--- Comment #10 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-03 12:04:22 UTC ---
Author: amonakov
Date: Fri Dec 3 12:04:16 2010
New Revision: 167415
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167415
Log:
PR rtl-optimization/45354
* sel-sched-ir.c (jump_leads_only_to_bb_p): Rename to ...
(bb_has_removable_jump_to_p): This. Update all callers. Make static.
Allow BBs ending with a conditional jump. Forbid EDGE_CROSSING jumps.
* sel-sched-ir.h (jump_leads_only_to_bb_p): Delete prototype.
testsuite:
* gcc.dg/tree-prof/pr45354.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/sel-sched-ir.c
trunk/gcc/sel-sched-ir.h
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2010-12-03 12:04 ` amonakov at gcc dot gnu.org
@ 2010-12-03 12:06 ` amonakov at gcc dot gnu.org
2011-04-07 6:58 ` abel at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-03 12:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #11 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-03 12:05:50 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2010-12-03 12:06 ` amonakov at gcc dot gnu.org
@ 2011-04-07 6:58 ` abel at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07 6:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45354
--- Comment #12 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 06:58:31 UTC ---
Author: abel
Date: Thu Apr 7 06:58:29 2011
New Revision: 172083
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172083
Log:
Backport from mainline
2010-12-03 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/45354
* sel-sched-ir.c (jump_leads_only_to_bb_p): Rename to ...
(bb_has_removable_jump_to_p): This. Update all callers. Make static.
Allow BBs ending with a conditional jump. Forbid EDGE_CROSSING jumps.
* sel-sched-ir.h (jump_leads_only_to_bb_p): Delete prototype.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/sel-sched-ir.c
branches/gcc-4_5-branch/gcc/sel-sched-ir.h
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-04-07 6:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-45354-4@http.gcc.gnu.org/bugzilla/>
2010-11-26 9:39 ` [Bug rtl-optimization/45354] [4.5/4.6 Regression] ICE: verify_flow_info failed: fallthru edge crosses section boundary (bb 6) with gcc.dg/tree-prof/update-cunroll-2.c ebotcazou at gcc dot gnu.org
2010-11-29 8:26 ` [Bug rtl-optimization/45354] [4.6 regression] ICE: fallthru edge crosses section boundary (bb 6) with g++.dg/bprob/g++-bprob-1.C ebotcazou at gcc dot gnu.org
2010-11-29 8:37 ` [Bug rtl-optimization/45354] [4.6 regression] ICE with -fselective-scheduling and -freorder-blocks-and-partition ebotcazou at gcc dot gnu.org
2010-11-29 8:38 ` ebotcazou at gcc dot gnu.org
2010-11-29 8:41 ` ebotcazou at gcc dot gnu.org
2010-11-29 14:21 ` amonakov at gcc dot gnu.org
2010-12-03 12:04 ` amonakov at gcc dot gnu.org
2010-12-03 12:06 ` amonakov at gcc dot gnu.org
2011-04-07 6:58 ` abel at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).