This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: avoid cfg rebuild after combine


On Sun, Jul 15, 2001 at 10:05:48PM +0200, Jan Hubicka wrote:
> 	* basic-block.h (purge_all_dead_edges, purge_dead_edges): New functions.
> 	* toplev.c (rest_of_compilation): Conditionally call purge_all_dead_edges
> 	after combine.
> 	* gcse.c (cprop_cc0_jump, cprop_insn): New argument "basic_block".
> 	(cprop_jump): Likewise; call purge_dead_edges if substitution suceeded.

Ok.

> + /* Assume that the preceeding pass has possibly eliminated jump instructions
> +    or converted the unconditional jumps.  Eliminate the edges from CFG.  */

  "or converted conditional jumps to unconditional jumps."

> +   /* In case we see other insn, we are not sure if the edges are not just
> +      edges created by the insn we see.  See whether we do have normal edges
> +      created by jump insn.  */

  /* If we don't see a jump insn, we don't know exactly why the block would
     have been broken at this point.  Look for a simple, non-fallthru edge,
     as these are only created by conditional branches.  If we find such an
     edge we know that there used to be a jump here and can then safely 
     remove all non-fallthru edges.  */


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]