This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
cfg vs ia64 machine-dependent-reorg
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 May 2002 00:05:51 -0700
- Subject: cfg vs ia64 machine-dependent-reorg
I've had this in my tree for weeks, but apparently forgot to commit it.
The problem is that split_all_insns_noflow destroys the CFG. If we
split the last insn of a block, bb->end won't be updated. In order
to use split_all_insns, we have to recompute block_for_insn a bit
earlier.
Finally, the comment is correct -- update_life_info_in_dirty_blocks
is indeed enough. We don't need to rebuild the whole thing.
r~
* config/ia64/ia64.c (ia64_reorg): Rebuild bb_for_insn before
splitting. Use split_all_insns; update_life_info_in_dirty_blocks.
Index: gcc/config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.163
diff -c -p -d -r1.163 ia64.c
*** gcc/config/ia64/ia64.c 17 May 2002 04:24:53 -0000 1.163
--- gcc/config/ia64/ia64.c 17 May 2002 06:57:51 -0000
*************** void
*** 6713,6727 ****
ia64_reorg (insns)
rtx insns;
{
- /* If optimizing, we'll have split before scheduling. */
- if (optimize == 0)
- split_all_insns_noflow ();
-
/* We are freeing block_for_insn in the toplev to keep compatibility
with old MDEP_REORGS that are not CFG based. Recompute it now. */
compute_bb_for_insn (get_max_uid ());
! /* update_life_info_in_dirty_blocks should be enought here. */
! life_analysis (insns, NULL, PROP_DEATH_NOTES);
if (ia64_flag_schedule_insns2)
{
--- 6713,6728 ----
ia64_reorg (insns)
rtx insns;
{
/* We are freeing block_for_insn in the toplev to keep compatibility
with old MDEP_REORGS that are not CFG based. Recompute it now. */
compute_bb_for_insn (get_max_uid ());
!
! /* If optimizing, we'll have split before scheduling. */
! if (optimize == 0)
! split_all_insns (0);
!
! update_life_info_in_dirty_blocks (UPDATE_LIFE_GLOBAL_RM_NOTES,
! PROP_DEATH_NOTES);
if (ia64_flag_schedule_insns2)
{