This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
trivial cleanups
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com, patches at x86-64 dot org
- Subject: trivial cleanups
- From: Jan Hubicka <jh at suse dot cz>
- Date: Mon, 24 Sep 2001 13:45:20 +0200
Two cleanups.
Bootstrapped/regtested i386
Sat Sep 22 17:10:19 CEST 2001 Jan Hubicka <jh@suse.cz>
* cfgcleanup.c (try_simplify_condjump): Cleanup invert_jump call.
* unroll.c (copy_loop_body): Use delete_insn.
*** /p2/cfg9/egcs/gcc/cfgcleanup.c Thu Sep 20 18:33:13 2001
--- cfgcleanup.c Sat Sep 22 14:19:55 2001
*************** try_simplify_condjump (cbranch_block)
*** 106,119 ****
if (!can_fallthru (jump_block, cbranch_dest_block))
return false;
! /* Invert the conditional branch. Prevent jump.c from deleting
! "unreachable" instructions. */
! LABEL_NUSES (JUMP_LABEL (cbranch_insn))++;
! if (!invert_jump (cbranch_insn, block_label (jump_dest_block), 1))
! {
! LABEL_NUSES (JUMP_LABEL (cbranch_insn))--;
! return false;
! }
if (rtl_dump_file)
fprintf (rtl_dump_file, "Simplifying condjump %i around jump %i\n",
--- 106,114 ----
if (!can_fallthru (jump_block, cbranch_dest_block))
return false;
! /* Invert the conditional branch. */
! if (!invert_jump (cbranch_insn, block_label (jump_dest_block), 0))
! return false;
if (rtl_dump_file)
fprintf (rtl_dump_file, "Simplifying condjump %i around jump %i\n",
*** /p2/cfg9/egcs/gcc/unroll.c Thu Sep 20 18:33:13 2001
--- unroll.c Sat Sep 22 13:57:10 2001
*************** copy_loop_body (loop, copy_start, copy_e
*** 2154,2167 ****
/* If this is now a no-op, delete it. */
if (map->last_pc_value == pc_rtx)
{
! /* Don't let delete_insn delete the label referenced here,
! because we might possibly need it later for some other
! instruction in the loop. */
! if (JUMP_LABEL (copy))
! LABEL_NUSES (JUMP_LABEL (copy))++;
! delete_related_insns (copy);
! if (JUMP_LABEL (copy))
! LABEL_NUSES (JUMP_LABEL (copy))--;
copy = 0;
}
else
--- 2154,2160 ----
/* If this is now a no-op, delete it. */
if (map->last_pc_value == pc_rtx)
{
! delete_insn (copy);
copy = 0;
}
else