This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Make dominated_by_p and get_immediate_dominator inline
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Jun 2010 22:33:49 +0200
- Subject: Re: Make dominated_by_p and get_immediate_dominator inline
- References: <20100622183636.GC23996@kam.mff.cuni.cz>
On Tue, Jun 22, 2010 at 8:36 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this is change I forgot in my tree for a while. ?get_immediate_dominator and
> dominated_by_p are one of most frequently called functions and they are good
> candidates for inlining. Dominated_by_p has fallback path calling et_forest
> code. ?Most of passes don't use dynamic dominance info and thus we never get
> there. ?I was thinking about making specific version for non-dynamic dominators,
> but since the most common calls from dominated_by_p comes from cfg.c
> (dominance frontiers computation) that is sort of generic, it would
> require more bookkeping of when info is dynamic and when not.
> Hopefully the cold path is not going to cause too much of trouble.
>
> The patch needs to include et-forest.h in basic-block.h, but I do not see
> much way around.
Do not make this inline?
I think making all these small functions inline makes things only more
entangled. Now you include et-forest.h in every place that includes
basic-block.h. I see no point in continuing my little project of
removing #include's if you plan to add more of these.
I would much rather *remove* inline functions and let WHOPR do its job!
Ciao!
Steven