Commit e45fcf80 by Richard Biener Committed by Richard Biener

re PR bootstrap/63204 (gtype-desc.c:887:40: error: 'struct loop' has no member…

re PR bootstrap/63204 (gtype-desc.c:887:40: error: 'struct loop' has no member named 'former_header' breaks bootstrap)

2014-09-08  Richard Biener  <rguenther@suse.de>

	PR bootstrap/63204
	* cfgloop.c (mark_loop_for_removal): Track former header
	unconditionally.
	* cfgloop.h (struct loop): Add former_header member unconditionally.
	* loop-init.c (fix_loop_structure): Enable bogus loop removal
	diagnostic unconditionally.

From-SVN: r215012
parent 08774518
2014-09-08 Richard Biener <rguenther@suse.de>
PR bootstrap/63204
* cfgloop.c (mark_loop_for_removal): Track former header
unconditionally.
* cfgloop.h (struct loop): Add former_header member unconditionally.
* loop-init.c (fix_loop_structure): Enable bogus loop removal
diagnostic unconditionally.
2014-09-07 Venkataramanan Kumar <venkataramanan.kumar@linaro.org> 2014-09-07 Venkataramanan Kumar <venkataramanan.kumar@linaro.org>
PR target/63190 PR target/63190
...@@ -1927,9 +1927,7 @@ bb_loop_depth (const_basic_block bb) ...@@ -1927,9 +1927,7 @@ bb_loop_depth (const_basic_block bb)
void void
mark_loop_for_removal (loop_p loop) mark_loop_for_removal (loop_p loop)
{ {
#ifdef ENABLE_CHECKING
loop->former_header = loop->header; loop->former_header = loop->header;
#endif
loop->header = NULL; loop->header = NULL;
loop->latch = NULL; loop->latch = NULL;
loops_state_set (LOOPS_NEED_FIXUP); loops_state_set (LOOPS_NEED_FIXUP);
......
...@@ -194,13 +194,11 @@ struct GTY ((chain_next ("%h.next"))) loop { ...@@ -194,13 +194,11 @@ struct GTY ((chain_next ("%h.next"))) loop {
/* Number of iteration analysis data for RTL. */ /* Number of iteration analysis data for RTL. */
struct niter_desc *simple_loop_desc; struct niter_desc *simple_loop_desc;
#ifdef ENABLE_CHECKING
/* For sanity checking during loop fixup we record here the former /* For sanity checking during loop fixup we record here the former
loop header for loops marked for removal. Note that this prevents loop header for loops marked for removal. Note that this prevents
the basic-block from being collected but its index can still be the basic-block from being collected but its index can still be
reused. */ reused. */
basic_block former_header; basic_block former_header;
#endif
}; };
/* Flags for state of loop structure. */ /* Flags for state of loop structure. */
......
...@@ -245,12 +245,10 @@ fix_loop_structure (bitmap changed_bbs) ...@@ -245,12 +245,10 @@ fix_loop_structure (bitmap changed_bbs)
} }
/* Remove the loop. */ /* Remove the loop. */
#ifdef ENABLE_CHECKING
if (loop->header) if (loop->header)
loop->former_header = loop->header; loop->former_header = loop->header;
else else
gcc_assert (loop->former_header != NULL); gcc_assert (loop->former_header != NULL);
#endif
loop->header = NULL; loop->header = NULL;
flow_loop_tree_node_remove (loop); flow_loop_tree_node_remove (loop);
} }
...@@ -278,7 +276,6 @@ fix_loop_structure (bitmap changed_bbs) ...@@ -278,7 +276,6 @@ fix_loop_structure (bitmap changed_bbs)
FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop) FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop)
if (loop && loop->header == NULL) if (loop && loop->header == NULL)
{ {
#ifdef ENABLE_CHECKING
if (dump_file if (dump_file
&& ((unsigned) loop->former_header->index && ((unsigned) loop->former_header->index
< basic_block_info_for_fn (cfun)->length ())) < basic_block_info_for_fn (cfun)->length ()))
...@@ -306,7 +303,6 @@ fix_loop_structure (bitmap changed_bbs) ...@@ -306,7 +303,6 @@ fix_loop_structure (bitmap changed_bbs)
former_header->loop_father->header->index); former_header->loop_father->header->index);
} }
} }
#endif
(*get_loops (cfun))[i] = NULL; (*get_loops (cfun))[i] = NULL;
flow_loop_free (loop); flow_loop_free (loop);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment