This is the mail archive of the 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: [RFC] cfg.c: Remove cached_make_edge.

Hi Jeff,

> But I couldn't convince myself it was actually a wise thing to do;
> because we could have nodes in the CFG with a high out degree in which
> their successors have a high in degree.  That would trigger poor
> behavior in find_edge.  It wouldn't be terribly hard to construct such
> code with a switch statement and some gotos.

I just constructed one. :-)

> An idea I just had would be to kill the edge cache except for critical
> edges where the head of the edge has a high out degree and the tail of
> the edge has a high in degree.  That captures precisely the cases where
> find_edge would be potentially useful. The question then becomes can we
> build & maintain the edge cache for just those edges and what would be
> the cost compared to what we do now.

One problem I am struggling is that if we are caching the existence of
edges, we still need find_edge in the following situation.  Say, we
get a request to add an edge, and that edge already exists, but we
still need to OR the new flags into the existing edge.  We could use a
hash table for the dense part of the CFG, but I haven't thought very
much about what to do with it.

Kazu Hirata

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