This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix basic_block_for_insn in commit_edge_insertions
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Subject: fix basic_block_for_insn in commit_edge_insertions
- From: Jan Hubicka <jh at suse dot cz>
- Date: Tue, 24 Jul 2001 23:44:46 +0200
Hi,
the basic_block_for_insn is bogus in some instances of commit_edge_insertions,
that can cause make_edges called by find_sub_basic_blocks to fail.
This patch should solve it.
Bootstrapped/regtested i686
St čec 25 00:38:55 CEST 2001 Jan Hubicka <jh@suse.cz>
* flow.c (block_label): Update basic_block_for_insn.
(commit_edge_insertions): Call compute_bb_for_insn.
*** flow.c.old Tue Jul 24 17:13:33 2001
--- flow.c Wed Jul 25 00:33:10 2001
*************** block_label (block)
*** 1591,1597 ****
if (block == EXIT_BLOCK_PTR)
return NULL_RTX;
if (GET_CODE (block->head) != CODE_LABEL)
! block->head = emit_label_before (gen_label_rtx (), block->head);
return block->head;
}
--- 1605,1615 ----
if (block == EXIT_BLOCK_PTR)
return NULL_RTX;
if (GET_CODE (block->head) != CODE_LABEL)
! {
! block->head = emit_label_before (gen_label_rtx (), block->head);
! if (basic_block_for_insn)
! set_block_for_insn (block->head, block);
! }
return block->head;
}
*************** commit_edge_insertions ()
*** 2292,2297 ****
--- 2277,2283 ----
{
int i;
basic_block bb;
+ compute_bb_for_insn (get_max_uid ());
#ifdef ENABLE_CHECKING
verify_flow_info ();