This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] More CCP improvements
- From: Jeff Law <law at porcupine dot slc dot redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Aug 2002 11:27:41 -0600
- Subject: [tree-ssa] More CCP improvements
- Reply-to: law at redhat dot com
It does little good to remove edges from the CFG if we don't try to
delete blocks which become unreachable. This patch also removes an
#if0 that sneaked into the last patch by accident.
Bootstrapped with tree-ssa-ccp enabled by default. Again, the insn-emit
comparison failure is unrelated to this patch.
* tree-ssa-ccp.c (tree_ssa_ccp): Remove #if 0 that accidentally
got checked in. Cleanup the cfg to remove unreachable blocks
discovered by CCP.
Index: tree-ssa-ccp.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-ccp.c,v
retrieving revision 1.1.2.12
diff -c -3 -p -r1.1.2.12 tree-ssa-ccp.c
*** tree-ssa-ccp.c 23 Aug 2002 16:52:58 -0000 1.1.2.12
--- tree-ssa-ccp.c 23 Aug 2002 17:15:37 -0000
*************** tree_ssa_ccp (fndecl)
*** 180,190 ****
/* Now perform substitutions based on the known constant values. */
ssa_ccp_substitute_constants ();
- #if 0
/* Remove unexecutable edges from the CFG and make appropriate
adjustments to PHI nodes. */
optimize_unexecutable_edges (edges);
! #endif
/* Now remove all unreachable insns and update the DF information.
as appropriate. */
--- 180,191 ----
/* Now perform substitutions based on the known constant values. */
ssa_ccp_substitute_constants ();
/* Remove unexecutable edges from the CFG and make appropriate
adjustments to PHI nodes. */
optimize_unexecutable_edges (edges);
!
! /* Now cleanup any unreachable code. */
! tree_cleanup_cfg ();
/* Now remove all unreachable insns and update the DF information.
as appropriate. */