GCC Middle and Back End API Reference
ana::analysis_plan Class Reference

#include <analysis-plan.h>

Inheritance diagram for ana::analysis_plan:
Collaboration diagram for ana::analysis_plan:

Public Member Functions

 analysis_plan (const supergraph &sg, logger *logger)
 
 ~analysis_plan ()
 
int cmp_function (function *fun_a, function *fun_b) const
 
bool use_summary_p (const cgraph_edge *edge) const
 
loggerget_logger () const
 
void set_logger (logger *logger)
 
void log (const char *fmt,...) const ATTRIBUTE_GCC_DIAG(2
 
void void start_log_line () const
 
void end_log_line () const
 
void enter_scope (const char *scope_name)
 
void exit_scope (const char *scope_name)
 
pretty_printerget_logger_pp () const
 
FILEget_logger_file () const
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (analysis_plan)
 

Private Attributes

const supergraphm_sg
 
cgraph_node ** m_cgraph_node_postorder
 
int m_num_cgraph_nodes
 
auto_vec< int > m_index_by_uid
 
loggerm_logger
 

Detailed Description

A class to encapsulate decisions about how the analysis should happen.
Examples:
- the order in which functions should be analyzed, so that function
  summaries are created before analysis of call sites that might use
  them
- which callgraph edges should use call summaries
TODO: the above is a work-in-progress.   

Constructor & Destructor Documentation

◆ analysis_plan()

ana::analysis_plan::analysis_plan ( const supergraph & sg,
logger * logger )

◆ ~analysis_plan()

ana::analysis_plan::~analysis_plan ( )

Member Function Documentation

◆ cmp_function()

int ana::analysis_plan::cmp_function ( function * fun_a,
function * fun_b ) const

◆ DISABLE_COPY_AND_ASSIGN()

ana::analysis_plan::DISABLE_COPY_AND_ASSIGN ( analysis_plan )
private

◆ end_log_line()

void ana::log_user::end_log_line ( ) const
inlineinherited
A shortcut for ending a log line from a log_user,
handling the common case where the underlying logger is NULL via
a no-op.   

References ana::logger::end_log_line(), and ana::log_user::m_logger.

◆ enter_scope()

void ana::log_user::enter_scope ( const char * scope_name)
inlineinherited
A shortcut for recording entry into a scope from a log_user,
handling the common case where the underlying logger is NULL via
a no-op.   

References ana::logger::enter_scope(), ggc_alloc(), and ana::log_user::m_logger.

◆ exit_scope()

void ana::log_user::exit_scope ( const char * scope_name)
inlineinherited
A shortcut for recording exit from a scope from a log_user,
handling the common case where the underlying logger is NULL via
a no-op.   

References ana::logger::exit_scope(), ggc_alloc(), and ana::log_user::m_logger.

◆ get_logger()

logger * ana::log_user::get_logger ( ) const
inlineinherited

◆ get_logger_file()

FILE * ana::log_user::get_logger_file ( ) const
inlineinherited

◆ get_logger_pp()

pretty_printer * ana::log_user::get_logger_pp ( ) const
inlineinherited

◆ log()

void ana::log_user::log ( const char * fmt,
... ) const
inlineinherited
A shortcut for calling log from a log_user, handling the common
case where the underlying logger is NULL via a no-op.   

References ap, ggc_alloc(), ana::logger::log_va(), and ana::log_user::m_logger.

◆ set_logger()

void ana::log_user::set_logger ( logger * logger)
inherited

◆ start_log_line()

void ana::log_user::start_log_line ( ) const
inlineinherited
A shortcut for starting a log line from a log_user,
handling the common case where the underlying logger is NULL via
a no-op.   

References ana::log_user::m_logger, and ana::logger::start_log_line().

◆ use_summary_p()

bool ana::analysis_plan::use_summary_p ( const cgraph_edge * edge) const

Field Documentation

◆ m_cgraph_node_postorder

cgraph_node** ana::analysis_plan::m_cgraph_node_postorder
private

◆ m_index_by_uid

auto_vec<int> ana::analysis_plan::m_index_by_uid
private

◆ m_logger

◆ m_num_cgraph_nodes

int ana::analysis_plan::m_num_cgraph_nodes
private

◆ m_sg

const supergraph& ana::analysis_plan::m_sg
private

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