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]
Other format: [Raw text]

Re: [tree-ssa] Speeding things up


  1. We get a list of all the blocks B dominates via get_dominated_by
  instead of walking all the blocks checking get_immediate_dominator.
  This avoids two walks over all the basic blocks and a boatload of
  calls to get_immediate_dominator.

  2. Immediate dominators are invariant when computing the dominance
  frontiers.  So we build a little cache of them so that looking up
  the immediate dominator for a block is an array index rather than
  a full blown function call.  This saves some time as well.
If you look, you'll notice i already added a cache inside get_immediate_dominator.
If the function call overhead is dominating, just move it to a header and static inline it.
There is no need to add *another* cache.
--Dan


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