GCC Middle and Back End API Reference
optinfo Class Reference

#include <optinfo.h>

Collaboration diagram for optinfo:

Public Types

enum class  kind { success , failure , note , scope }

Public Member Functions

 optinfo (const dump_location_t &loc, enum kind kind_, opt_pass *pass)
 ~optinfo ()
const dump_location_tget_dump_location () const
const dump_user_location_tget_user_location () const
const dump_impl_location_tget_impl_location () const
enum kind get_kind () const
opt_passget_pass () const
unsigned int num_items () const
const optinfo_itemget_item (unsigned int i) const
location_t get_location_t () const
profile_count get_count () const
void add_item (std::unique_ptr< optinfo_item > item)
void emit_for_opt_problem () const

Static Public Member Functions

static const char * kind_to_string (enum kind k)
static dump_flags_t kind_to_dump_flag (enum kind k)

Private Member Functions

void handle_dump_file_kind (dump_flags_t)

Private Attributes

dump_location_t m_loc
enum kind m_kind
opt_passm_pass
auto_vec< optinfo_item * > m_items

Friends

class dump_context

Detailed Description

A bundle of information describing part of an optimization.   

Member Enumeration Documentation

◆ kind

enum class optinfo::kind
strong
Enumerator
success 
failure 
note 
scope 

Constructor & Destructor Documentation

◆ optinfo()

optinfo::optinfo ( const dump_location_t & loc,
enum kind kind_,
opt_pass * pass )
inline

References m_items, m_kind, m_loc, and m_pass.

◆ ~optinfo()

optinfo::~optinfo ( )
optinfo's dtor.   

References FOR_EACH_VEC_ELT, i, and m_items.

Member Function Documentation

◆ add_item()

◆ emit_for_opt_problem()

void optinfo::emit_for_opt_problem ( ) const
Re-emit this optinfo, both to the "non-immediate" destinations,
*and* to the "immediate" destinations.   

References dump_context::dump_loc_immediate(), dump_context::emit_item(), dump_context::emit_optinfo(), FOR_EACH_VEC_ELT, dump_context::get(), get_kind(), get_user_location(), i, kind_to_dump_flag(), m_items, and MSG_PRIORITY_REEMITTED.

◆ get_count()

profile_count optinfo::get_count ( ) const
inline

References m_loc.

Referenced by optrecord_json_writer::optinfo_to_json().

◆ get_dump_location()

const dump_location_t & optinfo::get_dump_location ( ) const
inline

References m_loc.

◆ get_impl_location()

const dump_impl_location_t & optinfo::get_impl_location ( ) const
inline

References m_loc.

Referenced by optrecord_json_writer::optinfo_to_json().

◆ get_item()

const optinfo_item * optinfo::get_item ( unsigned int i) const
inline

References i, and m_items.

Referenced by optrecord_json_writer::optinfo_to_json().

◆ get_kind()

enum kind optinfo::get_kind ( ) const
inline

◆ get_location_t()

location_t optinfo::get_location_t ( ) const
inline

References m_loc.

Referenced by optrecord_json_writer::optinfo_to_json().

◆ get_pass()

opt_pass * optinfo::get_pass ( ) const
inline

◆ get_user_location()

const dump_user_location_t & optinfo::get_user_location ( ) const
inline

References m_loc.

Referenced by emit_for_opt_problem().

◆ handle_dump_file_kind()

void optinfo::handle_dump_file_kind ( dump_flags_t dump_kind)
private
Update the optinfo's kind based on DUMP_KIND.   

References failure, gcc_assert, m_kind, MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_OPTIMIZED_LOCATIONS, note, scope, and success.

◆ kind_to_dump_flag()

dump_flags_t optinfo::kind_to_dump_flag ( enum kind kind_)
static
Get MSG_* flags corresponding to KIND.   

References failure, gcc_unreachable, MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_OPTIMIZED_LOCATIONS, note, scope, and success.

Referenced by emit_for_opt_problem().

◆ kind_to_string()

const char * optinfo::kind_to_string ( enum kind kind_)
static
Get a string from KIND.   

References failure, gcc_unreachable, note, scope, and success.

Referenced by optrecord_json_writer::optinfo_to_json().

◆ num_items()

unsigned int optinfo::num_items ( ) const
inline

◆ dump_context

friend class dump_context
friend

References dump_context.

Referenced by dump_context.

Field Documentation

◆ m_items

◆ m_kind

enum kind optinfo::m_kind
private

◆ m_loc

◆ m_pass

opt_pass* optinfo::m_pass
private

Referenced by get_pass(), and optinfo().


The documentation for this class was generated from the following files: