GCC Middle and Back End API Reference
gcc::dump_manager Class Reference

#include <dumpfile.h>

Collaboration diagram for gcc::dump_manager:

Public Member Functions

 dump_manager ()
unsigned int dump_register (const char *suffix, const char *swtch, const char *glob, int flags, int optgroup_flags)
struct dump_file_infoget_dump_file_info (int phase) const
char * get_dump_file_name (int phase) const
int dump_switch_p (const char *arg)
int dump_start (int phase, int *flag_ptr)
void dump_finish (int phase)
FILE * dump_begin (int phase, int *flag_ptr)
int dump_initialized_p (int phase) const
const char * dump_flag_name (int phase) const

Private Member Functions

int dump_phase_enabled_p (int phase) const
int dump_switch_p_1 (const char *arg, struct dump_file_info *dfi, bool doglob)
int dump_enable_all (int flags, const char *filename)
int opt_info_enable_passes (int optgroup_flags, int flags, const char *filename)
friend bool::enable_rtl_dump_file (void)
friend int::opt_info_switch_p (const char *arg)

Private Attributes

int m_next_dump
struct dump_file_infom_extra_dump_files
size_t m_extra_dump_files_in_use
size_t m_extra_dump_files_alloced

Constructor & Destructor Documentation

gcc::dump_manager::dump_manager ( )

Member Function Documentation

     Grant access to dump_enable_all.  
FILE * gcc::dump_manager::dump_begin ( int  phase,
int *  flag_ptr 
)
     Initialize current flags 
int gcc::dump_manager::dump_enable_all ( int  flags,
const char *  filename 
)
private
   Enable all tree dumps with FLAGS on FILENAME.  Return number of
   enabled tree dumps.  
             Override the existing filename.  
                 Since it is a command-line provided file, which is
                 common to all the phases, use it in append mode.  
             Override the existing filename.  
                 Since it is a command-line provided file, which is
                 common to all the phases, use it in append mode.  

References free().

void gcc::dump_manager::dump_finish ( int  phase)
     Finish a tree dump for PHASE and close associated dump streams.  Also
     reset the globals DUMP_FILE, ALT_DUMP_FILE, and DUMP_FLAGS.  

Referenced by rest_of_type_compilation().

const char * gcc::dump_manager::dump_flag_name ( int  phase) const
     Returns the switch name of PHASE.  

References dump_file_info::pfilename, pflags, dump_file_info::pflags, and dump_file_info::pstate.

int gcc::dump_manager::dump_initialized_p ( int  phase) const
     Returns nonzero if tree dump PHASE has been initialized.  
int gcc::dump_manager::dump_phase_enabled_p ( int  phase) const
private
   Returns nonzero if dump PHASE is enabled for at least one stream.
   If PHASE is TDI_tree_all, return nonzero if any dump is enabled for
   any phase.  
unsigned int gcc::dump_manager::dump_register ( const char *  suffix,
const char *  swtch,
const char *  glob,
int  flags,
int  optgroup_flags 
)
int gcc::dump_manager::dump_start ( int  phase,
int *  flag_ptr 
)
     Start a dump for PHASE. Store user-supplied dump flags in
     *FLAG_PTR.  Return the number of streams opened.  Set globals
     DUMP_FILE, and ALT_DUMP_FILE to point to the opened streams, and
     set dump_flags appropriately for both pass dump stream and
     -fopt-info stream. 
         Initialize current dump flags. 
         Initialize current -fopt-info flags. 

References dump_file_info::pstate.

Referenced by rest_of_type_compilation().

int gcc::dump_manager::dump_switch_p ( const char *  arg)
     Don't glob if we got a hit already 

References eq_ptr(), dump_option_value_info::name, strlen(), and dump_option_value_info::value.

int gcc::dump_manager::dump_switch_p_1 ( const char *  arg,
struct dump_file_info dfi,
bool  doglob 
)
private
   Parse ARG as a dump switch. Return nonzero if it is, and store the
   relevant details in the dump_files array.  
             Interpret rest of the argument as a dump filename.  This
             filename overrides other command line filenames.  
     Process -fdump-tree-all and -fdump-rtl-all, by enabling all the
     known dumps.  

References dump_option_value_info::value.

struct dump_file_info * gcc::dump_manager::get_dump_file_info ( int  phase) const
read
     Return the dump_file_info for the given phase.  

References dump_file_info::pstate, and TDI_none.

char * gcc::dump_manager::get_dump_file_name ( int  phase) const
     Return the name of the dump file for the given phase.
     If the dump is not enabled, returns NULL.  
     If available, use the command line dump filename. 
gcc::dump_manager::int::opt_info_switch_p ( const char *  arg)
private
     Grant access to opt_info_enable_passes.  
int gcc::dump_manager::opt_info_enable_passes ( int  optgroup_flags,
int  flags,
const char *  filename 
)
private
   Enable -fopt-info dumps on all dump files matching OPTGROUP_FLAGS.
   Enable dumps with FLAGS on FILENAME.  Return the number of enabled
   dumps.  
             Since this file is shared among different passes, it
             should be opened in append mode.  
             Override the existing filename.  
             Since this file is shared among different passes, it
             should be opened in append mode.  
             Override the existing filename.  

Field Documentation

struct dump_file_info* gcc::dump_manager::m_extra_dump_files
private

Referenced by dump_register().

size_t gcc::dump_manager::m_extra_dump_files_alloced
private

Referenced by dump_manager(), and dump_register().

size_t gcc::dump_manager::m_extra_dump_files_in_use
private

Referenced by dump_manager().

int gcc::dump_manager::m_next_dump
private
     Dynamically registered dump files and switches.  

Referenced by dump_manager().


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