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

#include <pass_manager.h>

Collaboration diagram for gcc::pass_manager:

Public Member Functions

void * operator new (size_t sz)
 pass_manager (context *ctxt)
void register_pass (struct register_pass_info *pass_info)
void register_one_dump_file (struct opt_pass *pass)
opt_passget_pass_for_id (int id) const
void dump_passes () const
void dump_profile_report () const
void finish_optimization_passes ()
void execute_early_local_passes ()
unsigned int execute_pass_mode_switching ()
opt_passget_pass_split_all_insns () const
opt_passget_pass_mode_switching () const
opt_passget_pass_peephole2 () const

Data Fields

opt_passall_passes
opt_passall_small_ipa_passes
opt_passall_lowering_passes
opt_passall_regular_ipa_passes
opt_passall_lto_gen_passes
opt_passall_late_ipa_passes
opt_pass ** passes_by_id
int passes_by_id_size
opt_pass ** pass_lists [PASS_LIST_NUM]

Private Member Functions

void set_pass_for_id (int id, opt_pass *pass)
int register_dump_files_1 (struct opt_pass *pass, int properties)
void register_dump_files (struct opt_pass *pass, int properties)

Private Attributes

contextctxt_

Constructor & Destructor Documentation


Member Function Documentation

void pass_manager::execute_early_local_passes ( )
unsigned int pass_manager::execute_pass_mode_switching ( )
struct opt_pass * pass_manager::get_pass_for_id ( int  id) const
read
Return the pass with the static pass number ID.   

References passes_by_id, and passes_by_id_size.

Referenced by statistics_fini().

opt_pass* gcc::pass_manager::get_pass_mode_switching ( ) const
inline
opt_pass* gcc::pass_manager::get_pass_peephole2 ( ) const
inline
opt_pass* gcc::pass_manager::get_pass_split_all_insns ( ) const
inline
void * pass_manager::operator new ( size_t  sz)
Construct the pass tree.  The sequencing of passes is driven by
   the cgraph routines:

   finalize_compilation_unit ()
       for each node N in the cgraph
           cgraph_analyze_function (N)
               cgraph_lower_function (N) -> all_lowering_passes

   If we are optimizing, compile is then invoked:

   compile ()
       ipa_passes ()                    -> all_small_ipa_passes
                                        -> Analysis of all_regular_ipa_passes
        * possible LTO streaming at copmilation time *
                                        -> Execution of all_regular_ipa_passes
        * possible LTO streaming at link time *
                                        -> all_late_ipa_passes
       expand_all_functions ()
           for each node N in the cgraph
               expand_function (N)      -> Transformation of all_regular_ipa_passes
                                        -> all_passes
void pass_manager::register_dump_files ( struct opt_pass pass,
int  properties 
)
private
Register the dump files for the pass_manager starting at PASS.
   PROPERTIES reflects the properties that are guaranteed to be available at
   the beginning of the pipeline.   

References pass_data::properties_required, and register_dump_files_1().

Referenced by pass_manager().

int pass_manager::register_dump_files_1 ( struct opt_pass pass,
int  properties 
)
private
void pass_manager::set_pass_for_id ( int  id,
opt_pass pass 
)
private
Set the static pass number of pass PASS to ID and record that
   in the mapping from static pass number to pass.   

References memset(), passes_by_id, passes_by_id_size, and opt_pass::static_pass_number.

Referenced by register_one_dump_file().


Field Documentation

opt_pass* gcc::pass_manager::all_late_ipa_passes
opt_pass* gcc::pass_manager::all_lowering_passes
opt_pass* gcc::pass_manager::all_passes
opt_pass* gcc::pass_manager::all_small_ipa_passes
context* gcc::pass_manager::ctxt_
private
opt_pass** gcc::pass_manager::pass_lists[PASS_LIST_NUM]
opt_pass** gcc::pass_manager::passes_by_id
int gcc::pass_manager::passes_by_id_size

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