This is the mail archive of the gcc@gcc.gnu.org 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: Basic Block Statistics


On 05/16/2017 12:24 PM, Will Hawkins wrote:
> Hello everyone!
> 
> I apologize if this is not the right venue to ask this question and/or
> 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 compilation
> unit.
> 
> If nothing like this exists, I am more than happy to code something up
> 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.
I don't think we have anything which inherently will give you this
information.

It'd be a useful thing to have though.  Implementation may be made more
difficult by insns that generate > 1 instruction.

Jeff


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