This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: computed gotos and memory requirements.
- To: lucier at math dot purdue dot edu, rth at cygnus dot com
- Subject: Re: computed gotos and memory requirements.
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Tue, 26 Oct 1999 16:32:39 -0500 (EST)
- Cc: gcc at gcc dot gnu dot org, feeley at iro dot umontreal dot ca
> From rth@cygnus.com Tue Oct 26 15:50:42 1999
> On Tue, Oct 26, 1999 at 02:27:26PM -0500, Brad Lucier wrote:
> > Wouldn't it be much more efficient, and give you the same amount
> > of useful information, to have one more type of edge information,
> > an EDGE_COMPUTED edge, that would point to a single array of possible
> > label addresses, with their information stored only once and shared by
> > all the EDGE_COMPUTED edges?
>
> I'd rather not have multiple edge structure formats, since that
> complicates every place edges are used.
I guess I'm thinking about
#define EDGE_COMPUTED_GOTO 64
in basic-block.h after the other EDGE_* definitions, and using edge->aux
to point to the computed-goto information.
You'd need
(1) no pass to use edge->aux if edge->flags & EDGE_COMPUTED_GOTO is true.
(2) to special-case programs that use the flow info, but I think you
have to do that already with the other edge types.
> But something similar did occur to me recently. Instead of representing
> edges differently, we create a special CGOTO_BLOCK (index -3) that has
> all computed gotos as predecessors and all addressed labels as successors.
> In this way we'd prevent the exponential growth of edges.
Unfortunately, I don't understand this approach beyond the principle of it.
Brad