GCC Middle and Back End API Reference
histogram_entry Struct Reference

Data Fields

gcov_type count
int time
int size

Detailed Description


Basic IPA optimizations based on profile. Copyright (C) 2003-2013 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   ipa-profile pass implements the following analysis propagating profille

   - Count histogram construction.  This is a histogram analyzing how much
     time is spent executing statements with a given execution count read
     from profile feedback. This histogram is complette only with LTO,
     otherwise it contains information only about the current unit.

     Similar histogram is also estimated by coverage runtime.  This histogram
     is not dependent on LTO, but it suffers from various defects; first
     gcov runtime is not weighting individual basic block by estimated execution
     time and second the merging of multiple runs makes assumption that the
     histogram distribution did not change.  Consequentely histogram constructed
     here may be more precise.

     The information is used to set hot/cold thresholds.
   - Next speculative indirect call resolution is performed:  the local
     profile pass assigns profile-id to each function and provide us with a
     histogram specifying the most common target.  We look up the callgraph
     node corresponding to the target and produce a speculative call.

     This call may or may not survive through IPA optimization based on decision
     of inliner. 
   - Finally we propagate the following flags: unlikely executed, executed
     once, executed at startup and executed at exit.  These flags are used to
     control code size/performance threshold and and code placement (by producing
     .text.unlikely/.text.hot/.text.startup/.text.exit subsections).  
   Entry in the histogram.  

Field Documentation

gcov_type histogram_entry::count

Referenced by histogram_hash::hash().

int histogram_entry::size
int histogram_entry::time

The documentation for this struct was generated from the following file: