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: PATCH: use type-safe vectors for basic block edges


Richard Henderson <rth@redhat.com> writes:

> On Tue, Sep 14, 2004 at 12:01:59PM +1000, Ben Elliston wrote:
> > How does this revised patch to basic-block.h look?
> 
> What's the proposed usage idiom?

Here's an example from tree-cfg.c:

  FOR_EACH_EDGE (ei, ENTRY_BLOCK_PTR->succs)
    {
      e = ei_edge (ei);
      fprintf (file, "edge: { sourcename: \"ENTRY\" targetname: \"%d\"",
	       e->dest->index);

      if (e->flags & EDGE_FAKE)
	fprintf (file, " linestyle: dotted priority: 10");
      else
	fprintf (file, " linestyle: solid priority: 100");

      fprintf (file, " }\n");
    }

Ben


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