This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Good news about increased jump threading from my PHI mergepatch


Hi Jeff,

> > I think my pass
> > basically requires DCE.  We clean up CFG before entering SSA, so we
> > shouldn't have any PHI merge opportunity unless some dead code between
> > two PHI nodes are removed.
> Which almost makes me wonder if removing forwarder blocks is better
> off as its own pass.

That's what I am doing for PHI merge.

> We would schedule it to run after the DCE/DSE.  We would also call
> it from cleanup_tree_cfg if and only if we were able to determine
> the result of a COND_EXPR_COND or SWITCH_COND.

But we have more ways to create forwarder blocks than just DCE and
DSE.  split_edge creates forwarder blocks.  So does ch.

I instrumented cleanup_tree_cfg and printed the current pass name
whenever forwarder blocks are removed while compiling cc1-i files.
Here is the number of times cleanup_forwarder_blocks did some work.

   5034 dce
   5024 loopdone
   2352 ch
   1903 cddce
   1477 final_cleanup
   1449 cfg
   1373 dom
     32 tailr
     28 ccp
      3 phiopt

Passes that call cleanup_tree_cfg (either directly or via
TODO_cleanup_cfg) are ccp, dom, dce, cddce, loopdone, ch, phiopt,
tailr, tailc, pre, and final_cleanup.  The only pass that does not
appear in the stats above is tailc.  PRE does not appear either but
that's because abnormal edges don't appear in GCC source code.

Kazu Hirata


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