GCC Middle and Back End API Reference
tree-ssa-loop.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "memmodel.h"
#include "tm_p.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "tree-ssa-loop-ivopts.h"
#include "tree-ssa-loop-manip.h"
#include "tree-ssa-loop-niter.h"
#include "tree-ssa-loop.h"
#include "cfgloop.h"
#include "tree-inline.h"
#include "tree-scalar-evolution.h"
#include "omp-general.h"
#include "diagnostic-core.h"
#include "stringpool.h"
#include "attribs.h"
Include dependency graph for tree-ssa-loop.cc:

Macros

#define MAX_LSM_NAME_LENGTH   40
 

Functions

gimple_opt_passmake_pass_fix_loops (gcc::context *ctxt)
 
static bool gate_loop (function *fn)
 
gimple_opt_passmake_pass_tree_loop (gcc::context *ctxt)
 
static bool gate_oacc_kernels (function *fn)
 
gimple_opt_passmake_pass_oacc_kernels (gcc::context *ctxt)
 
simple_ipa_opt_passmake_pass_ipa_oacc (gcc::context *ctxt)
 
simple_ipa_opt_passmake_pass_ipa_oacc_kernels (gcc::context *ctxt)
 
gimple_opt_passmake_pass_tree_no_loop (gcc::context *ctxt)
 
gimple_opt_passmake_pass_tree_loop_init (gcc::context *ctxt)
 
gimple_opt_passmake_pass_scev_cprop (gcc::context *ctxt)
 
gimple_opt_passmake_pass_iv_optimize (gcc::context *ctxt)
 
static unsigned int tree_ssa_loop_done (void)
 
gimple_opt_passmake_pass_tree_loop_done (gcc::context *ctxt)
 
bool for_each_index (tree *addr_p, bool(*cbck)(tree, tree *, void *), void *data)
 
static void lsm_tmp_name_add (const char *s)
 
static void gen_lsm_tmp_name (tree ref)
 
charget_lsm_tmp_name (tree ref, unsigned n, const char *suffix)
 
unsigned tree_num_loop_insns (class loop *loop, eni_weights *weights)
 

Variables

static char lsm_tmp_name [MAX_LSM_NAME_LENGTH+1]
 
static int lsm_tmp_name_length
 

Macro Definition Documentation

◆ MAX_LSM_NAME_LENGTH

#define MAX_LSM_NAME_LENGTH   40
The name and the length of the currently generated variable
for lsm.   

Referenced by lsm_tmp_name_add().

Function Documentation

◆ for_each_index()

bool for_each_index ( tree * addr_p,
bool(*)(tree, tree *, void *) cbck,
void * data )
Calls CBCK for each index in memory reference ADDR_P.  There are two
kinds situations handled; in each of these cases, the memory reference
and DATA are passed to the callback:

Access to an array: ARRAY_{RANGE_}REF (base, index).  In this case we also
pass the pointer to the index to the callback.

Pointer dereference: INDIRECT_REF (addr).  In this case we also pass the
pointer to addr to the callback.

If the callback returns false, the whole search stops and false is returned.
Otherwise the function returns true after traversing through the whole
reference *ADDR_P.   

References CONSTANT_CLASS_P, DECL_P, gcc_assert, gcc_unreachable, ggc_alloc(), is_gimple_min_invariant(), TMR_BASE, TMR_INDEX, TMR_INDEX2, TREE_CODE, and TREE_OPERAND.

Referenced by analyze_ref(), can_sm_ref_p(), dse_classify_store(), execute_sm(), find_interesting_uses_address(), infer_loop_bounds_from_ref(), propagate_with_phi(), and ref_within_array_bound().

◆ gate_loop()

static bool gate_loop ( function * fn)
static
Gate for loop pass group.  The group is controlled by -ftree-loop-optimize
but we also avoid running it when the IL doesn't contain any loop.   

References ggc_alloc(), loops_for_fn(), and number_of_loops().

◆ gate_oacc_kernels()

static bool gate_oacc_kernels ( function * fn)
static
Gate for oacc kernels pass group.   

References cfun, function::decl, DECL_ATTRIBUTES, ggc_alloc(), loop::in_oacc_kernels_region, and lookup_attribute().

◆ gen_lsm_tmp_name()

static void gen_lsm_tmp_name ( tree ref)
static
Stores the name for temporary variable that replaces REF to
lsm_tmp_name.   

References gen_lsm_tmp_name(), get_name(), ggc_alloc(), lsm_tmp_name_add(), TREE_CODE, and TREE_OPERAND.

Referenced by gen_lsm_tmp_name(), and get_lsm_tmp_name().

◆ get_lsm_tmp_name()

char * get_lsm_tmp_name ( tree ref,
unsigned n,
const char * suffix )
Determines name for temporary variable that replaces REF.
The name is accumulated into the lsm_tmp_name variable.
N is added to the name of the temporary.   

References gen_lsm_tmp_name(), lsm_tmp_name, lsm_tmp_name_add(), lsm_tmp_name_length, and NULL.

Referenced by execute_sm(), execute_sm_if_changed_flag_set(), and predcom_tmp_var().

◆ lsm_tmp_name_add()

static void lsm_tmp_name_add ( const char * s)
static
Adds S to lsm_tmp_name.   

References ggc_alloc(), lsm_tmp_name, lsm_tmp_name_length, and MAX_LSM_NAME_LENGTH.

Referenced by gen_lsm_tmp_name(), and get_lsm_tmp_name().

◆ make_pass_fix_loops()

gimple_opt_pass * make_pass_fix_loops ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_ipa_oacc()

simple_ipa_opt_pass * make_pass_ipa_oacc ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_ipa_oacc_kernels()

simple_ipa_opt_pass * make_pass_ipa_oacc_kernels ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_iv_optimize()

gimple_opt_pass * make_pass_iv_optimize ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_oacc_kernels()

gimple_opt_pass * make_pass_oacc_kernels ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_scev_cprop()

gimple_opt_pass * make_pass_scev_cprop ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_tree_loop()

gimple_opt_pass * make_pass_tree_loop ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_tree_loop_done()

gimple_opt_pass * make_pass_tree_loop_done ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_tree_loop_init()

gimple_opt_pass * make_pass_tree_loop_init ( gcc::context * ctxt)

References ggc_alloc().

◆ make_pass_tree_no_loop()

gimple_opt_pass * make_pass_tree_no_loop ( gcc::context * ctxt)

References ggc_alloc().

◆ tree_num_loop_insns()

unsigned tree_num_loop_insns ( class loop * loop,
eni_weights * weights )
Computes an estimated number of insns in LOOP, weighted by WEIGHTS.   

References estimate_num_insns(), free(), get_loop_body(), ggc_alloc(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), i, and loop::num_nodes.

Referenced by can_unroll_loop_p(), and loop_prefetch_arrays().

◆ tree_ssa_loop_done()

static unsigned int tree_ssa_loop_done ( void )
static

Variable Documentation

◆ lsm_tmp_name

char lsm_tmp_name[MAX_LSM_NAME_LENGTH+1]
static

◆ lsm_tmp_name_length

int lsm_tmp_name_length
static