GCC Middle and Back End API Reference
profile-count.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "profile-count.h"
#include "options.h"
#include "tree.h"
#include "basic-block.h"
#include "function.h"
#include "cfg.h"
#include "gimple.h"
#include "data-streamer.h"
#include "cgraph.h"
#include "wide-int.h"
#include "sreal.h"
Include dependency graph for profile-count.cc:

Functions

const char * profile_quality_as_string (enum profile_quality quality)
 
bool parse_profile_quality (const char *value, profile_quality *quality)
 
bool slow_safe_scale_64bit (uint64_t a, uint64_t b, uint64_t c, uint64_t *res)
 

Variables

const char * profile_quality_names []
 
const char * profile_quality_display_names []
 

Function Documentation

◆ parse_profile_quality()

bool parse_profile_quality ( const char * value,
profile_quality * quality )
Parse VALUE as profile quality and return true when a valid QUALITY.   

References i, and profile_quality_names.

◆ profile_quality_as_string()

const char * profile_quality_as_string ( enum profile_quality quality)

◆ slow_safe_scale_64bit()

bool slow_safe_scale_64bit ( uint64_t a,
uint64_t b,
uint64_t c,
uint64_t * res )
Compute RES=(a*b + c/2)/c capping and return false if overflow happened.   

References a, b, wi::fits_uhwi_p(), FIXED_WIDE_INT, gcc_checking_assert, wi::udiv_floor(), and wi::umul().

Referenced by safe_scale_64bit().

Variable Documentation

◆ profile_quality_display_names

const char* profile_quality_display_names[]
Initial value:
=
{
"estimated locally",
"estimated locally, globally 0",
"estimated locally, globally 0 adjusted",
"guessed",
"auto FDO",
"adjusted",
"precise"
}
#define NULL
Definition system.h:50
Display names from profile_quality enum values.   

Referenced by profile_count::dump().

◆ profile_quality_names

const char* profile_quality_names[]
Initial value:
=
{
"uninitialized",
"guessed_local",
"guessed_global0",
"guessed_global0adjusted",
"guessed",
"afdo",
"adjusted",
"precise"
}
Profile counter container type.
   Copyright (C) 2017-2024 Free Software Foundation, Inc.
   Contributed by Jan Hubicka

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/>.   
Names from profile_quality enum values.   

Referenced by parse_profile_quality(), and profile_quality_as_string().