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-2024 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

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
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
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 complete only with LTO,
  otherwise it contains information only about the current unit.

  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 code placement (by producing
  .text.unlikely/.text.hot/.text.startup/.text.exit subsections).   
Entry in the histogram.   

Field Documentation

◆ count

gcov_type histogram_entry::count

◆ size

int histogram_entry::size

◆ time

int histogram_entry::time

Referenced by account_time_size().

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