GCC Middle and Back End API Reference
passes.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "emit-rtl.h"
#include "cgraph.h"
#include "lto-streamer.h"
#include "fold-const.h"
#include "varasm.h"
#include "output.h"
#include "graph.h"
#include "debug.h"
#include "cfgloop.h"
#include "value-prof.h"
#include "tree-cfg.h"
#include "tree-ssa-loop-manip.h"
#include "tree-into-ssa.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
#include "tree-pass.h"
#include "plugin.h"
#include "ipa-utils.h"
#include "tree-pretty-print.h"
#include "context.h"
#include "pass_manager.h"
#include "cfgrtl.h"
#include "tree-ssa-live.h"
#include "tree-cfgcleanup.h"
#include "insn-addr.h"
#include "diagnostic-core.h"
#include "stringpool.h"
#include "attribs.h"
#include "pass-instances.def"
Include dependency graph for passes.cc:

Data Structures

struct  uid_range
 
struct  pass_list_node
 

Macros

#define INSERT_PASSES_AFTER(PASS)
 
#define PUSH_INSERT_PASSES_WITHIN(PASS, NUM)
 
#define POP_INSERT_PASSES()
 
#define NEXT_PASS(PASS, NUM)
 
#define NEXT_PASS_WITH_ARG(PASS, NUM, ARG)
 
#define TERMINATE_PASS_LIST(PASS)
 
#define DEF_PASS_LIST(LIST)
 
#define INSERT_PASSES_AFTER(PASS)
 
#define TERMINATE_PASS_LIST(PASS)
 
#define PUSH_INSERT_PASSES_WITHIN(PASS, NUM)
 
#define POP_INSERT_PASSES()
 
#define NEXT_PASS(PASS, NUM)
 
#define NEXT_PASS_WITH_ARG(PASS, NUM, ARG)
 
#define DEF_PASS_LIST(LIST)
 

Typedefs

typedef const char * char_ptr
 
typedef struct uid_rangeuid_range_p
 

Functions

void print_current_pass (FILE *file)
 
DEBUG_FUNCTION void debug_pass (void)
 
void rest_of_decl_compilation (tree decl, int top_level, int at_end)
 
void rest_of_type_compilation (tree type, int toplev)
 
static unsigned int execute_build_ssa_passes (void)
 
simple_ipa_opt_passmake_pass_build_ssa_passes (gcc::context *ctxt)
 
simple_ipa_opt_passmake_pass_local_optimization_passes (gcc::context *ctxt)
 
simple_ipa_opt_passmake_pass_ipa_remove_symbols (gcc::context *ctxt)
 
static gimple_opt_passmake_pass_all_early_optimizations (gcc::context *ctxt)
 
static gimple_opt_passmake_pass_all_optimizations (gcc::context *ctxt)
 
static gimple_opt_passmake_pass_all_optimizations_g (gcc::context *ctxt)
 
static rtl_opt_passmake_pass_rest_of_compilation (gcc::context *ctxt)
 
static rtl_opt_passmake_pass_postreload (gcc::context *ctxt)
 
static rtl_opt_passmake_pass_late_compilation (gcc::context *ctxt)
 
gimple_opt_passmake_pass_pre_slp_scalar_cleanup (gcc::context *ctxt)
 
void register_one_dump_file (opt_pass *pass)
 
bool passes_pass_traverse (const char *const &name, opt_pass *const &pass, void *)
 
static bool override_gate_status (opt_pass *, tree, bool)
 
static void dump_one_pass (opt_pass *pass, int pass_indent)
 
static void dump_pass_list (opt_pass *pass, int indent)
 
void dump_passes (void)
 
static void enable_disable_pass (const char *arg, bool is_enable)
 
void enable_pass (const char *arg)
 
void disable_pass (const char *arg)
 
static bool is_pass_explicitly_enabled_or_disabled (opt_pass *pass, tree func, vec< uid_range_p > tab)
 
static void add_pass_instance (opt_pass *new_pass, bool track_duplicates, opt_pass *initial_pass)
 
static opt_pass ** next_pass_1 (opt_pass **list, opt_pass *pass, opt_pass *initial_pass)
 
static bool position_pass (struct register_pass_info *new_pass_info, opt_pass **pass_list)
 
void register_pass (struct register_pass_info *pass_info)
 
void register_pass (opt_pass *pass, pass_positioning_ops pos, const char *ref_pass_name, int ref_pass_inst_number)
 
static void delete_pass_tree (opt_pass *pass)
 
static void do_per_function (void(*callback)(function *, void *data), void *data)
 
static void remove_cgraph_node_from_order (cgraph_node *node, void *data)
 
static void insert_cgraph_node_to_order (cgraph_node *node, void *data)
 
static void duplicate_cgraph_node_to_order (cgraph_node *node, cgraph_node *node2, void *data)
 
void do_per_function_toporder (void(*callback)(function *, void *data), void *data)
 
static void execute_function_dump (function *fn, void *data)
 
void emergency_dump_function ()
 
static void check_profile_consistency (int index, bool run)
 
static void account_profile (int index, bool run)
 
static void account_profile_1 (function *fn, void *data)
 
static void account_profile_in_list (opt_pass *sub)
 
void dump_profile_report (void)
 
static void execute_function_todo (function *fn, void *data)
 
static void execute_todo (unsigned int flags)
 
static void verify_interpass_invariants (void)
 
static void clear_last_verified (function *fn, void *data)
 
static void verify_curr_properties (function *fn, void *data)
 
static void release_dump_file_name (void)
 
bool pass_init_dump_file (opt_pass *pass)
 
void pass_fini_dump_file (opt_pass *pass)
 
static void update_properties_after_pass (function *fn, void *data)
 
void execute_ipa_summary_passes (ipa_opt_pass_d *ipa_pass)
 
static void execute_one_ipa_transform_pass (struct cgraph_node *node, ipa_opt_pass_d *ipa_pass, bool do_not_collect)
 
void execute_all_ipa_transforms (bool do_not_collect)
 
static bool determine_pass_name_match (const char *pass_name, char *criterion)
 
static bool should_skip_pass_p (opt_pass *pass)
 
static void skip_pass (opt_pass *pass)
 
bool execute_one_pass (opt_pass *pass)
 
static void execute_pass_list_1 (opt_pass *pass)
 
void execute_pass_list (function *fn, opt_pass *pass)
 
static void write_lto (void)
 
static void ipa_write_summaries_2 (opt_pass *pass, struct lto_out_decl_state *state)
 
static void ipa_write_summaries_1 (lto_symtab_encoder_t encoder, bool output_offload_tables_p)
 
void ipa_write_summaries (void)
 
static void ipa_write_optimization_summaries_1 (opt_pass *pass, struct lto_out_decl_state *state)
 
void ipa_write_optimization_summaries (lto_symtab_encoder_t encoder, bool output_offload_tables_p)
 
static void ipa_read_summaries_1 (opt_pass *pass)
 
void ipa_read_summaries (void)
 
static void ipa_read_optimization_summaries_1 (opt_pass *pass)
 
void ipa_read_optimization_summaries (void)
 
void execute_ipa_pass_list (opt_pass *pass)
 
static void execute_ipa_stmt_fixups (opt_pass *pass, struct cgraph_node *node, gimple **stmts)
 
void execute_all_ipa_stmt_fixups (struct cgraph_node *node, gimple **stmts)
 
void debug_properties (unsigned int)
 
void dump_properties (FILE *, unsigned int)
 
bool function_called_by_processed_nodes_p (void)
 

Variables

opt_passcurrent_pass
 
bool in_gimple_form
 
static vec< char_ptrpass_tab
 
static vec< uid_range_penabled_pass_uid_range_tab
 
static vec< uid_range_pdisabled_pass_uid_range_tab
 
static struct pass_list_nodeadded_pass_nodes = NULL
 
static struct pass_list_nodeprev_added_pass_node
 
static struct profile_record * profile_record
 

Macro Definition Documentation

◆ DEF_PASS_LIST [1/2]

#define DEF_PASS_LIST ( LIST)
Value:
pass_lists[PASS_LIST_NO_##LIST] = &LIST;

◆ DEF_PASS_LIST [2/2]

#define DEF_PASS_LIST ( LIST)
Value:
delete_pass_tree (*pass_lists[PASS_LIST_NO_##LIST]);
static void delete_pass_tree(opt_pass *pass)
Definition passes.cc:1662

◆ INSERT_PASSES_AFTER [1/2]

#define INSERT_PASSES_AFTER ( PASS)

◆ INSERT_PASSES_AFTER [2/2]

#define INSERT_PASSES_AFTER ( PASS)
Value:
{ \
opt_pass **p_start; \
p_start = p = &(PASS);
Definition tree-pass.h:74

◆ NEXT_PASS [1/2]

#define NEXT_PASS ( PASS,
NUM )
Value:
PASS ## _ ## NUM = NULL
@ NUM
Definition gengtype.h:481
#define _(msgid)
Definition intl.h:52
#define NULL
Definition system.h:50

◆ NEXT_PASS [2/2]

#define NEXT_PASS ( PASS,
NUM )
Value:
do { \
gcc_assert (PASS ## _ ## NUM == NULL); \
if ((NUM) == 1) \
PASS ## _1 = make_##PASS (m_ctxt); \
else \
{ \
gcc_assert (PASS ## _1); \
PASS ## _ ## NUM = PASS ## _1->clone (); \
} \
p = next_pass_1 (p, PASS ## _ ## NUM, PASS ## _1); \
} while (0)
static opt_pass ** next_pass_1(opt_pass **list, opt_pass *pass, opt_pass *initial_pass)
Definition passes.cc:1351

◆ NEXT_PASS_WITH_ARG [1/2]

#define NEXT_PASS_WITH_ARG ( PASS,
NUM,
ARG )
Value:
NEXT_PASS (PASS, NUM)
#define NEXT_PASS(PASS, NUM)

◆ NEXT_PASS_WITH_ARG [2/2]

#define NEXT_PASS_WITH_ARG ( PASS,
NUM,
ARG )
Value:
do { \
NEXT_PASS (PASS, NUM); \
PASS ## _ ## NUM->set_pass_param (0, ARG); \
} while (0)

◆ POP_INSERT_PASSES [1/2]

#define POP_INSERT_PASSES ( )

◆ POP_INSERT_PASSES [2/2]

#define POP_INSERT_PASSES ( )
Value:
}

◆ PUSH_INSERT_PASSES_WITHIN [1/2]

#define PUSH_INSERT_PASSES_WITHIN ( PASS,
NUM )

◆ PUSH_INSERT_PASSES_WITHIN [2/2]

#define PUSH_INSERT_PASSES_WITHIN ( PASS,
NUM )
Value:
{ \
opt_pass **p = &(PASS ## _ ## NUM)->sub;

◆ TERMINATE_PASS_LIST [1/2]

#define TERMINATE_PASS_LIST ( PASS)

◆ TERMINATE_PASS_LIST [2/2]

#define TERMINATE_PASS_LIST ( PASS)
Value:
gcc_assert (p_start == &PASS); \
*p = NULL; \
}
#define gcc_assert(EXPR)
Definition system.h:821

Typedef Documentation

◆ char_ptr

typedef const char* char_ptr
Map from pass id to canonicalized pass name.   

◆ uid_range_p

typedef struct uid_range* uid_range_p

Function Documentation

◆ account_profile()

static void account_profile ( int index,
bool run )
static
Account profile the pass with static number INDEX.
RUN is true if the pass really runs, or FALSE
if we are only book-keeping on passes that may have selectively disabled
themselves on a given function.   

References g, gcc_assert, gcc::context::get_passes(), gcc::pass_manager::passes_by_id_size, profile_record_account_profile(), and profile_record::run.

Referenced by account_profile_1(), account_profile_in_list(), execute_all_ipa_transforms(), and execute_one_pass().

◆ account_profile_1()

static void account_profile_1 ( function * fn,
void * data )
static
Account profile for IPA pass.  Callback for do_per_function.   

References account_profile(), check_profile_consistency(), pop_cfun(), push_cfun(), and opt_pass::static_pass_number.

Referenced by execute_one_pass().

◆ account_profile_in_list()

static void account_profile_in_list ( opt_pass * sub)
static
Account profile chnages to all passes in list starting in SUB.   

References account_profile(), account_profile_in_list(), and check_profile_consistency().

Referenced by account_profile_in_list(), and execute_one_pass().

◆ add_pass_instance()

static void add_pass_instance ( opt_pass * new_pass,
bool track_duplicates,
opt_pass * initial_pass )
static
Update static_pass_number for passes (and the flag
TODO_mark_first_instance).

Passes are constructed with static_pass_number preinitialized to 0

This field is used in two different ways: initially as instance numbers
of their kind, and then as ids within the entire pass manager.

Within pass_manager::pass_manager:

* In add_pass_instance(), as called by next_pass_1 in
  NEXT_PASS in init_optimization_passes

* When the initial instance of a pass within a pass manager is seen,
  it is flagged, and its static_pass_number is set to -1

* On subsequent times that it is seen, the static pass number
  is decremented each time, so that if there are e.g. 4 dups,
  they have static_pass_number -4, 2, 3, 4 respectively (note
  how the initial one is negative and gives the count); these
  can be thought of as instance numbers of the specific pass

* Within the register_dump_files () traversal, set_pass_for_id()
  is called on each pass, using these instance numbers to create
  dumpfile switches, and then overwriting them with a pass id,
  which are global to the whole pass manager (based on
  (TDI_end + current value of extra_dump_files_in_use) )   

References invoke_plugin_callbacks(), pass_data::name, opt_pass::static_pass_number, pass_data::todo_flags_start, and TODO_mark_first_instance.

Referenced by next_pass_1(), and position_pass().

◆ check_profile_consistency()

static void check_profile_consistency ( int index,
bool run )
static
Do profile consistency book-keeping for the pass with static number INDEX.
RUN is true if the pass really runs, or FALSE
if we are only book-keeping on passes that may have selectively disabled
themselves on a given function.   

References g, gcc_assert, gcc::context::get_passes(), gcc::pass_manager::passes_by_id_size, profile_record_check_consistency(), and profile_record::run.

Referenced by account_profile_1(), account_profile_in_list(), execute_all_ipa_transforms(), and execute_one_pass().

◆ clear_last_verified()

static void clear_last_verified ( function * fn,
void * data )
static
Clear the last verified flag.   

References function::last_verified.

Referenced by execute_one_pass().

◆ debug_pass()

DEBUG_FUNCTION void debug_pass ( void )
Call from the debugger to get the current pass name.   

References print_current_pass().

◆ debug_properties()

DEBUG_FUNCTION void debug_properties ( unsigned int props)
extern

References dump_properties().

◆ delete_pass_tree()

static void delete_pass_tree ( opt_pass * pass)
static

◆ determine_pass_name_match()

static bool determine_pass_name_match ( const char * pass_name,
char * criterion )
static
Determine if PASS_NAME matches CRITERION.
Not a pure predicate, since it can update CRITERION, to support
matching the Nth invocation of a pass.
Subroutine of should_skip_pass_p.   

Referenced by should_skip_pass_p().

◆ disable_pass()

void disable_pass ( const char * arg)
Disable pass specified by ARG.   

References enable_disable_pass().

Referenced by handle_common_deferred_options().

◆ do_per_function()

static void do_per_function ( void(* callback )(function *, void *data),
void * data )
static
If we are in IPA mode (i.e., current_function_decl is NULL), call
function CALLBACK for every function in the call graph.  Otherwise,
call CALLBACK on the current function.   

References symtab_node::analyzed, cfun, cgraph_node::clone_of, current_function_decl, symtab_node::decl, DECL_STRUCT_FUNCTION, FOR_EACH_DEFINED_FUNCTION, and gimple_has_body_p().

Referenced by execute_one_ipa_transform_pass(), execute_one_pass(), and execute_todo().

◆ do_per_function_toporder()

◆ dump_one_pass()

static void dump_one_pass ( opt_pass * pass,
int pass_indent )
static
Dump the instantiated name for PASS. IS_ON indicates if PASS
is turned on or not.   

References cfun, current_function_decl, opt_pass::gate(), pass_data::name, override_gate_status(), pass_tab, and opt_pass::static_pass_number.

Referenced by dump_pass_list().

◆ dump_pass_list()

static void dump_pass_list ( opt_pass * pass,
int indent )
static
Dump pass list PASS with indentation INDENT.   

References dump_one_pass(), dump_pass_list(), opt_pass::next, and opt_pass::sub.

Referenced by dump_pass_list(), and gcc::pass_manager::dump_passes().

◆ dump_passes()

void dump_passes ( void )
Dump all optimization passes.   

References gcc::pass_manager::dump_passes(), g, and gcc::context::get_passes().

Referenced by symbol_table::finalize_compilation_unit().

◆ dump_profile_report()

void dump_profile_report ( void )
Output profile consistency.   

References gcc::pass_manager::dump_profile_report(), g, and gcc::context::get_passes().

Referenced by finalize().

◆ dump_properties()

◆ duplicate_cgraph_node_to_order()

static void duplicate_cgraph_node_to_order ( cgraph_node * node,
cgraph_node * node2,
void * data )
static
Hook called when NODE is duplicated and therefore should be
excluded from removed_nodes.  DATA is a hash set with removed nodes.   

References hash_set< KeyId, Lazy, Traits >::contains(), gcc_checking_assert, and hash_set< KeyId, Lazy, Traits >::remove().

Referenced by do_per_function_toporder().

◆ emergency_dump_function()

void emergency_dump_function ( void )
This function is called when an internal compiler error is encountered.
Ensure that function dump is made available before compiler is aborted.   

References cfun, current_pass, symbol_table::dump(), dump_file, dump_file_name, dump_flags, execute_function_dump(), finish_graph_dump_file(), fnotice(), GIMPLE_PASS, IPA_PASS, pass_data::name, PROP_cfg, RTL_PASS, symtab, TDF_GRAPH, and pass_data::type.

Referenced by internal_error_function().

◆ enable_disable_pass()

static void enable_disable_pass ( const char * arg,
bool is_enable )
static
Parse option string for -fdisable- and -fenable-
  The syntax of the options:

  -fenable-<pass_name>
  -fdisable-<pass_name>

  -fenable-<pass_name>=s1:e1,s2:e2,...
  -fdisable-<pass_name>=s1:e1,s2:e2,...

References uid_range::assem_name, disabled_pass_uid_range_tab, enabled_pass_uid_range_tab, error(), free(), g, gcc::pass_manager::get_pass_by_name(), gcc::context::get_passes(), inform(), last, uid_range::last, uid_range::next, NULL, uid_range::start, opt_pass::static_pass_number, and UNKNOWN_LOCATION.

Referenced by disable_pass(), and enable_pass().

◆ enable_pass()

void enable_pass ( const char * arg)
Enable pass specified by ARG.   

References enable_disable_pass().

Referenced by handle_common_deferred_options().

◆ execute_all_ipa_stmt_fixups()

void execute_all_ipa_stmt_fixups ( struct cgraph_node * node,
gimple ** stmts )
Execute stmt fixup hooks of all IPA passes for NODE and STMTS.   

References gcc::pass_manager::all_regular_ipa_passes, execute_ipa_stmt_fixups(), g, and gcc::context::get_passes().

Referenced by input_function().

◆ execute_all_ipa_transforms()

◆ execute_build_ssa_passes()

static unsigned int execute_build_ssa_passes ( void )
static

References IPA_SSA, symbol_table::state, and symtab.

◆ execute_function_dump()

◆ execute_function_todo()

◆ execute_ipa_pass_list()

◆ execute_ipa_stmt_fixups()

static void execute_ipa_stmt_fixups ( opt_pass * pass,
struct cgraph_node * node,
gimple ** stmts )
static

◆ execute_ipa_summary_passes()

void execute_ipa_summary_passes ( ipa_opt_pass_d * ipa_pass)

◆ execute_one_ipa_transform_pass()

◆ execute_one_pass()

◆ execute_pass_list()

◆ execute_pass_list_1()

◆ execute_todo()

◆ function_called_by_processed_nodes_p()

bool function_called_by_processed_nodes_p ( void )
Called by local passes to see if function is called by already processed nodes.
Because we process nodes in topological order, this means that function is
in recursive cycle or we introduced new direct calls.   

References cgraph_edge::caller, current_function_decl, symtab_node::decl, cgraph_node::dump(), dump_file, cgraph_node::get(), cgraph_node::has_gimple_body_p(), cgraph_node::inlined_to, cgraph_edge::next_caller, NULL, cgraph_node::process, and TREE_ASM_WRITTEN.

Referenced by skip_function_for_local_pure_const().

◆ insert_cgraph_node_to_order()

static void insert_cgraph_node_to_order ( cgraph_node * node,
void * data )
static
Hook called when NODE is insert and therefore should be
excluded from removed_nodes.  DATA is a hash set with removed nodes.   

References hash_set< KeyId, Lazy, Traits >::remove().

Referenced by do_per_function_toporder().

◆ ipa_read_optimization_summaries()

void ipa_read_optimization_summaries ( void )
Read all the summaries for all_regular_ipa_passes.   

References gcc::pass_manager::all_regular_ipa_passes, g, gcc::context::get_passes(), and ipa_read_optimization_summaries_1().

◆ ipa_read_optimization_summaries_1()

◆ ipa_read_summaries()

void ipa_read_summaries ( void )
Read all the summaries for all_regular_ipa_passes.   

References gcc::pass_manager::all_regular_ipa_passes, g, gcc::context::get_passes(), and ipa_read_summaries_1().

◆ ipa_read_summaries_1()

◆ ipa_write_optimization_summaries()

void ipa_write_optimization_summaries ( lto_symtab_encoder_t encoder,
bool output_offload_tables_p )

◆ ipa_write_optimization_summaries_1()

static void ipa_write_optimization_summaries_1 ( opt_pass * pass,
struct lto_out_decl_state * state )
static

◆ ipa_write_summaries()

◆ ipa_write_summaries_1()

static void ipa_write_summaries_1 ( lto_symtab_encoder_t encoder,
bool output_offload_tables_p )
static
Helper function of ipa_write_summaries. Creates and destroys the
decl state and calls ipa_write_summaries_2 for all passes that have
summaries.  SET is the set of nodes to be written.   

References gcc::pass_manager::all_regular_ipa_passes, g, gcc_assert, gcc::context::get_passes(), ipa_write_summaries_2(), lto_delete_out_decl_state(), lto_get_out_decl_state(), lto_new_out_decl_state(), lto_output_init_mode_table(), lto_pop_out_decl_state(), lto_push_out_decl_state(), and write_lto().

Referenced by ipa_write_summaries().

◆ ipa_write_summaries_2()

static void ipa_write_summaries_2 ( opt_pass * pass,
struct lto_out_decl_state * state )
static
Same as execute_pass_list but assume that subpasses of IPA passes
are local passes. If SET is not NULL, write out summaries of only
those node in SET.  

References cfun, current_function_decl, current_pass, opt_pass::gate(), gcc_assert, GIMPLE_PASS, IPA_PASS, ipa_write_summaries_2(), opt_pass::next, pass_fini_dump_file(), pass_init_dump_file(), SIMPLE_IPA_PASS, opt_pass::sub, timevar_pop(), timevar_push(), pass_data::tv_id, pass_data::type, and ipa_opt_pass_d::write_summary.

Referenced by ipa_write_summaries_1(), and ipa_write_summaries_2().

◆ is_pass_explicitly_enabled_or_disabled()

static bool is_pass_explicitly_enabled_or_disabled ( opt_pass * pass,
tree func,
vec< uid_range_p > tab )
static

◆ make_pass_all_early_optimizations()

static gimple_opt_pass * make_pass_all_early_optimizations ( gcc::context * ctxt)
static

◆ make_pass_all_optimizations()

static gimple_opt_pass * make_pass_all_optimizations ( gcc::context * ctxt)
static

◆ make_pass_all_optimizations_g()

static gimple_opt_pass * make_pass_all_optimizations_g ( gcc::context * ctxt)
static

◆ make_pass_build_ssa_passes()

simple_ipa_opt_pass * make_pass_build_ssa_passes ( gcc::context * ctxt)

◆ make_pass_ipa_remove_symbols()

simple_ipa_opt_pass * make_pass_ipa_remove_symbols ( gcc::context * ctxt)

◆ make_pass_late_compilation()

static rtl_opt_pass * make_pass_late_compilation ( gcc::context * ctxt)
static

◆ make_pass_local_optimization_passes()

simple_ipa_opt_pass * make_pass_local_optimization_passes ( gcc::context * ctxt)

◆ make_pass_postreload()

static rtl_opt_pass * make_pass_postreload ( gcc::context * ctxt)
static

◆ make_pass_pre_slp_scalar_cleanup()

gimple_opt_pass * make_pass_pre_slp_scalar_cleanup ( gcc::context * ctxt)

◆ make_pass_rest_of_compilation()

static rtl_opt_pass * make_pass_rest_of_compilation ( gcc::context * ctxt)
static

◆ next_pass_1()

static opt_pass ** next_pass_1 ( opt_pass ** list,
opt_pass * pass,
opt_pass * initial_pass )
static
Add a pass to the pass list. Duplicate the pass if it's already
in the list.   

References add_pass_instance(), gcc_assert, pass_data::name, opt_pass::next, and NULL.

◆ override_gate_status()

static bool override_gate_status ( opt_pass * pass,
tree func,
bool gate_status )
static
Check if PASS is explicitly disabled or enabled and return
the gate status.  FUNC is the function to be processed, and
GATE_STATUS is the gate status determined by pass manager by
default.   

References disabled_pass_uid_range_tab, enabled_pass_uid_range_tab, and is_pass_explicitly_enabled_or_disabled().

Referenced by dump_one_pass(), and execute_one_pass().

◆ pass_fini_dump_file()

◆ pass_init_dump_file()

◆ passes_pass_traverse()

bool passes_pass_traverse ( const char *const & name,
opt_pass *const & pass,
void *  )
Callback function for traversing NAME_TO_PASS_MAP.   

References gcc_assert, pass_tab, and opt_pass::static_pass_number.

Referenced by gcc::pass_manager::create_pass_tab().

◆ position_pass()

◆ print_current_pass()

void print_current_pass ( FILE * file)
Call from anywhere to find out what pass this is.  Useful for
printing out debugging information deep inside an service
routine.   

References current_pass, pass_data::name, and opt_pass::static_pass_number.

Referenced by debug_pass().

◆ register_one_dump_file()

void register_one_dump_file ( opt_pass * pass)
Iterate over the pass tree allocating dump file numbers.  We want
to do this depth first, and independent of whether the pass is
enabled or not.   

References g, gcc::context::get_passes(), and gcc::pass_manager::register_one_dump_file().

Referenced by gcc::dump_manager::register_pass().

◆ register_pass() [1/2]

void register_pass ( opt_pass * pass,
pass_positioning_ops pos,
const char * ref_pass_name,
int ref_pass_inst_number )

◆ register_pass() [2/2]

void register_pass ( struct register_pass_info * pass_info)
Hooks a new pass into the pass lists.

PASS_INFO   - pass information that specifies the opt_pass object,
              reference pass, instance number, and how to position
              the pass   

References g, gcc::context::get_passes(), and gcc::pass_manager::register_pass().

Referenced by register_callback().

◆ release_dump_file_name()

static void release_dump_file_name ( void )
static
Release dump file name if set.   

References CONST_CAST, dump_file_name, free(), and NULL.

Referenced by pass_fini_dump_file(), and pass_init_dump_file().

◆ remove_cgraph_node_from_order()

static void remove_cgraph_node_from_order ( cgraph_node * node,
void * data )
static
Hook called when NODE is removed and therefore should be
excluded from order vector.  DATA is a hash set with removed nodes.   

References hash_set< KeyId, Lazy, Traits >::add().

Referenced by do_per_function_toporder().

◆ rest_of_decl_compilation()

void rest_of_decl_compilation ( tree decl,
int top_level,
int at_end )
This is called from various places for FUNCTION_DECL, VAR_DECL,
and TYPE_DECL nodes.

This does nothing for local (non-static) variables, unless the
variable is a register variable with DECL_ASSEMBLER_NAME set.  In
that case, or if the variable is not an automatic, it sets up the
RTL and outputs any assembler code (label definition, storage
allocation and initialization).

DECL is the declaration.  TOP_LEVEL is nonzero
if this declaration is not within a function.   

References asm_out_file, assemble_alias(), BUILTINS_LOCATION, current_function_decl, debug_hooks, DECL_ASSEMBLER_NAME_SET_P, DECL_ATTRIBUTES, DECL_DEFER_OUTPUT, DECL_EXTERNAL, decl_function_context(), DECL_HAS_VALUE_EXPR_P, DECL_INITIAL, DECL_REGISTER, DECL_SAVED_TREE, DECL_SOURCE_LOCATION, DECL_STRUCT_FUNCTION, decl_type_context(), gcc_debug_hooks::early_global_decl, finalize(), varpool_node::finalize_decl(), varpool_node::get_create(), get_identifier(), HAS_DECL_ASSEMBLER_NAME_P, last_assemble_variable_decl, lookup_attribute(), make_decl_rtl(), NULL, seen_error(), targetm, timevar_pop(), timevar_push(), TREE_CODE, TREE_STATIC, TREE_STRING_POINTER, TREE_VALUE, gcc_debug_hooks::type_decl, and VAR_P.

Referenced by expand_one_hard_reg_var(), and wrapup_global_declaration_2().

◆ rest_of_type_compilation()

void rest_of_type_compilation ( tree type,
int toplev )
Called after finishing a record, union or enumeral type.   

References debug_hooks, seen_error(), timevar_pop(), timevar_push(), gcc_debug_hooks::type_decl, and TYPE_STUB_DECL.

◆ should_skip_pass_p()

static bool should_skip_pass_p ( opt_pass * pass)
static
For skipping passes until "startwith" pass.
Return true iff PASS should be skipped.
Clear cfun->pass_startwith when encountering the "startwith" pass,
so that all subsequent passes are run.   

References cfun, determine_pass_name_match(), GIMPLE_PASS, pass_data::name, NULL, PROP_ssa, pass_data::properties_destroyed, pass_data::properties_provided, and pass_data::type.

Referenced by execute_one_pass().

◆ skip_pass()

static void skip_pass ( opt_pass * pass)
static
Skip the given pass, for handling passes before "startwith"
in __GIMPLE and__RTL-marked functions.
In theory, this ought to be a no-op, but some of the RTL passes
need additional processing here.   

References cfg_layout_rtl_register_cfg_hooks(), cfun, epilogue_completed, get_max_uid(), INSN_ADDRESSES_ALLOC, pass_data::name, PROP_cfglayout, reload_completed, and rtl_register_cfg_hooks().

Referenced by execute_one_pass().

◆ update_properties_after_pass()

static void update_properties_after_pass ( function * fn,
void * data )
static
After executing the pass, apply expected changes to the function
properties.  

References function::curr_properties, pass_data::properties_destroyed, and pass_data::properties_provided.

Referenced by execute_one_pass().

◆ verify_curr_properties()

static void verify_curr_properties ( function * fn,
void * data )
static
Helper function. Verify that the properties has been turn into the
properties expected by the pass.   

References function::curr_properties, and gcc_assert.

Referenced by execute_one_pass().

◆ verify_interpass_invariants()

static void verify_interpass_invariants ( void )
static
Verify invariants that should hold between passes.  This is a place
to put simple sanity checks.   

References fold_deferring_overflow_warnings_p(), and gcc_checking_assert.

Referenced by execute_one_ipa_transform_pass(), and execute_one_pass().

◆ write_lto()

static void write_lto ( void )
static

Variable Documentation

◆ added_pass_nodes

struct pass_list_node* added_pass_nodes = NULL
static

◆ current_pass

◆ disabled_pass_uid_range_tab

vec<uid_range_p> disabled_pass_uid_range_tab
static

◆ enabled_pass_uid_range_tab

vec<uid_range_p> enabled_pass_uid_range_tab
static

◆ in_gimple_form

◆ pass_tab

◆ prev_added_pass_node

struct pass_list_node* prev_added_pass_node
static

Referenced by position_pass().

◆ profile_record

struct profile_record* profile_record
static