[tree-ssa] Speeding things up
Diego Novillo
dnovillo@redhat.com
Wed Jan 29 23:50:00 GMT 2003
On Wed, 29 Jan 2003, Jeff Law wrote:
> Right. The big big winner is fixing the dominator children search.
>
> Daniel -- I know about the cache in get_immediate_dominator. But
> it's really silly to have to make all those calls just to get one
> piece of information. The only thing sillier would be to inline
> get_immediate_dominator. inline functions are not a solution for
> lameness.
>
Well, we have several callers of get_immediate_dominator
throughout the compiler. Forcing them to cache the results of
get_immediate_dominator will not hide design problems in them.
Calling get_immediate_dominator unnecessarily is exactly the same
problem as accessing the cache repeatedly.
I don't think we can categorize inline functions as "lame
design". They give you a clean interface to your data structures
without the function call overhead.
In fact, I submit that they help finding performance problems.
If your profile data shows a bazillion calls to the same puny
function, then you know where to start looking :)
Although I don't feel too strongly about this issue, I am
inclined to think, however, that if we are going to cache
dominance information, we should do it in the dominance routines
themselves. That's a much cleaner design.
Diego.
More information about the Gcc-patches
mailing list