Creating a prettier flow graph

Jeffrey A Law law@cygnus.com
Wed Oct 14 01:22:00 GMT 1998


  In message <Pine.GSO.4.02A.9810121644190.25421-100000@matlock.informatik.rwth
-aachen.de>you write:
  > Currently, the cfg built by flow.c is a fairly ugly construct, consisting
  > of a circular LABEL_REFS chain and the basic_block_drops_in array.  This
  > patch does the following:
  >   - represent edges as int_list, like compute_preds_succs
Good.

  >   - delete most of compute_preds_succs as a result (all of it should be
  >     deleted, and the other passes which use it should simply use the
  >     previously computed cfg IMHO)
Not possible at the current time since the cfg changes (possibly radically) 
between the various passes that need to compute the cfg.

Long term we want to be able to incrementally update the cfg, but I do not
think we should try and solve that problem yet.

Seems to me like you leak memory for the succ/pred lists.  find_basic_blocks
can be called many times...

Otherwise it looks pretty good.  We may want an interface to get the edges
as a list/array since other routines want to work on edges instead of block
pred/succ lists.

jeff



More information about the Gcc-patches mailing list