This is the mail archive of the
mailing list for the GCC project.
Re: [RFC, PATCH]: Introduction of callgraph annotation class
- From: Martin Jambor <mjambor at suse dot cz>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Martin LiÅka <mliska at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Oct 2014 17:01:14 +0200
- Subject: Re: [RFC, PATCH]: Introduction of callgraph annotation class
- Authentication-results: sourceware.org; auth=none
- References: <543EA03A dot 7000000 at suse dot cz> <CAFiYyc12P-DMR=7otSYN+G6DJLK=y+EN7c4sBFZBk1=Lgz9Mzw at mail dot gmail dot com> <20141016114052 dot GA11618 at kam dot mff dot cuni dot cz> <CAFiYyc1iyfpfK=qujDXa_xpp2kQ_j6psEOgxOWT4Y9+NhiAChQ at mail dot gmail dot com>
On Thu, Oct 16, 2014 at 01:44:05PM +0200, Richard Biener wrote:
> On Thu, Oct 16, 2014 at 1:40 PM, Jan Hubicka <email@example.com> wrote:
> >> I don't like "generic annotation" facilities at all. Would it be possible
> > Why?
> Because it's the way to hell if the IL has "magic" things only one
> pass can understand. It can't ever know if it may invalidate some
> of that data.
But what would be an alternative to summaries? Putting all, even
pass-special, data into cgraph_node and cgraph_edge? Because with LTO
we do not have function bodies at our disposal, the summaries that we
keep in annotations are large enough that we certainly do not want to
grow cgraph_node by that much.
Annotations are only intended for IPA passes, intraprocedural ones
should not worry about the magic in them (yeah, IPA-SRA has to, but
the problem is IPA-SRA, not annotations). Unfortunately, due to the
three stage nature of IPA world, passes will occasionally trip over
each other, but the solution is a clear API so that passes can
"communicate," rather than making every pass understand data of every
other one. And this patch moves us in that direction.
> Same reason why I dislike the ->aux pointers we have. (even if they
> are of course convenient)
I don't think aux is a good analogy. It is used always only very
briefly, while data from annotations is even stored on disk in LTO.