This is the mail archive of the
mailing list for the GCC project.
Re: Basic Block Statistics
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Will Hawkins <whh8b at virginia dot edu>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 16 May 2017 14:45:46 -0400
- Subject: Re: Basic Block Statistics
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dmalcolm at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 86CFF448D7E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 86CFF448D7E
- References: <CAE+MWFunCPEWzhmvOtuwo6L4C1vaS9r_L_eSHANx0fY8N2xgMw@mail.gmail.com>
On Tue, 2017-05-16 at 14:24 -0400, Will Hawkins wrote:
> Hello everyone!
> I apologize if this is not the right venue to ask this question
> this is a waste of your time.
> I was just wondering if there are statistics that gcc can emit that
> includes either a) the average number of instructions per basic block
> and/or b) the average size (in bytes) per basic block in a
> If nothing like this exists, I am more than happy to code something
> if people besides me think that it might be interesting.
> I promise that I googled for information before asking, but I can't
> guarantee that I didn't miss anything. Again, I apologize if I just
> needed to RTFM better.
> Thanks in advance for any responses!
I don't think anything like this currently exists, but it's probably
doable via a plugin, e.g. by hooking up a new RTL pass somewhere
towards the end of the pass pipeline.
That said, IIRC basic blocks aren't used in the final passes;
presumably they're not meaningful after the "free_cfg" pass.
Hope this is helpful