GCC Middle and Back End API Reference
graphite-sese-to-poly.c File Reference

Data Structures

class  sese_dom_walker

Functions

static void tree_int_to_gmp ()
static size_t phi_arg_in_outermost_loop ()
static void remove_simple_copy_phi ()
static void remove_invariant_phi ()
static bool simple_copy_phi_p ()
static bool reduction_phi_p ()
static gimple_bb_p new_gimple_bb ()
static void free_data_refs_aux ()
static void free_gimple_bb ()
static void remove_gbbs_in_scop ()
void free_scops ()
static loop_p outermost_loop_in_sese_1 ()
static gimple_bb_p try_generate_gimple_bb ()
static bool all_non_dominated_preds_marked_p ()
static int compare_bb_depths ()
static void graphite_sort_dominated_info ()
static void build_scop_bbs_1 ()
static void build_scop_bbs ()
static isl_id * isl_id_for_pbb ()
static void build_pbb_scattering_polyhedrons (isl_aff *static_sched, poly_bb_p pbb, int scattering_dimensions)
static void build_scop_scattering ()
static isl_pw_aff * extract_affine (scop_p, tree, __isl_take isl_space *space)
static isl_pw_aff * extract_affine_chrec ()
static isl_pw_aff * extract_affine_mul ()
static isl_id * isl_id_for_ssa_name ()
static isl_id * isl_id_for_dr ()
static isl_pw_aff * extract_affine_name ()
static isl_pw_aff * extract_affine_gmp ()
static isl_pw_aff * extract_affine_int ()
static isl_pw_aff * wrap ()
static int parameter_index_in_region_1 ()
static int parameter_index_in_region ()
static isl_pw_aff * extract_affine ()
static void scan_tree_for_params ()
static void find_params_in_bb ()
static void find_scop_parameters ()
static void build_loop_iteration_domains (scop_p scop, struct loop *loop, int nb, isl_set *outer, isl_set **doms)
static isl_pw_aff * create_pw_aff_from_tree ()
static void add_condition_to_pbb ()
static void add_conditions_to_domain ()
static void add_conditions_to_constraints ()
static gimple single_pred_cond_non_loop_exit ()
static void add_param_constraints ()
static void build_scop_context ()
static void build_scop_iteration_domain ()
static isl_map * pdr_add_alias_set ()
static isl_map * set_index ()
static isl_map * pdr_add_memory_accesses ()
static isl_set * pdr_add_data_dimensions ()
static void build_poly_dr ()
static bool write_alias_graph_to_ascii_dimacs (FILE *file, char *comment, vec< data_reference_p > drs)
static bool write_alias_graph_to_ascii_dot (FILE *file, char *comment, vec< data_reference_p > drs)
static bool write_alias_graph_to_ascii_ecc (FILE *file, char *comment, vec< data_reference_p > drs)
static bool dr_same_base_object_p (const struct data_reference *dr1, const struct data_reference *dr2)
static int build_alias_set_optimal_p ()
static void build_base_obj_set_for_drs ()
static void build_pbb_drs ()
static void dump_alias_graphs ()
static void build_scop_drs ()
static gimple_stmt_iterator gsi_for_phi_node ()
static void analyze_drs_in_stmts ()
static void insert_stmts (scop_p scop, gimple stmt, gimple_seq stmts, gimple_stmt_iterator insert_gsi)
static void insert_out_of_ssa_copy ()
static void new_pbb_from_pbb ()
static void insert_out_of_ssa_copy_on_edge ()
static tree create_zero_dim_array ()
static bool scalar_close_phi_node_p ()
static void propagate_expr_outside_region ()
static void rewrite_close_phi_out_of_ssa ()
static void rewrite_phi_out_of_ssa ()
static void rewrite_degenerate_phi ()
static void rewrite_reductions_out_of_ssa ()
static void rewrite_cross_bb_scalar_dependence (scop_p scop, tree zero_dim_array, tree def, gimple use_stmt)
static void handle_scalar_deps_crossing_scop_limits ()
static bool rewrite_cross_bb_scalar_deps ()
static void rewrite_cross_bb_scalar_deps_out_of_ssa ()
static int nb_pbbs_in_loops ()
static int nb_data_writes_in_bb ()
static edge split_pbb ()
static basic_block split_reduction_stmt ()
static bool is_reduction_operation_p ()
static bool phi_contains_arg ()
static gimple follow_ssa_with_commutative_ops ()
static gimple detect_commutative_reduction_arg (tree lhs, gimple stmt, tree arg, vec< gimple > *in, vec< gimple > *out)
static gimple detect_commutative_reduction_assign (gimple stmt, vec< gimple > *in, vec< gimple > *out)
static gimple follow_inital_value_to_phi ()
static edge edge_initial_value_for_loop_phi ()
static tree initial_value_for_loop_phi ()
static bool used_outside_reduction ()
static gimple detect_commutative_reduction (scop_p scop, gimple stmt, vec< gimple > *in, vec< gimple > *out)
static void translate_scalar_reduction_to_array_for_stmt (scop_p scop, tree red, gimple stmt, gimple loop_phi)
static void remove_phi ()
static bool dr_indices_valid_in_loop ()
static tree close_phi_written_to_memory ()
static void translate_scalar_reduction_to_array (scop_p scop, vec< gimple > in, vec< gimple > out)
static bool rewrite_commutative_reductions_out_of_ssa_close_phi (scop_p scop, gimple close_phi)
static bool rewrite_commutative_reductions_out_of_ssa_loop (scop_p scop, loop_p loop)
static void rewrite_commutative_reductions_out_of_ssa ()
static bool scop_ivs_can_be_represented ()
void build_poly_scop ()

Function Documentation

static void add_condition_to_pbb ( )
static
   Add conditional statement STMT to pbb.  CODE is used as the comparison
   operator.  This allows us to invert the condition or to handle
   inequalities.  

References gimple_cond_code(), and invert_tree_comparison().

static void add_conditions_to_constraints ( )
static
   Traverses all the GBBs of the SCOP and add their constraints to the
   iteration domains.  
static void add_conditions_to_domain ( )
static
   Add conditions to the domain of PBB.  
               The conditions for ELSE-branches are inverted.  
           Switch statements are not supported right now - fall through.  
static void add_param_constraints ( )
static
   Add constraints on the possible values of parameter P from the type
   of P.  

References scop_nb_params().

static bool all_non_dominated_preds_marked_p ( )
static
   Returns true if all predecessors of BB, that are not dominated by BB, are
   marked in MAP.  The predecessors dominated by BB are loop latches and will
   be handled after BB.  

References d1, d2, loop_depth(), and basic_block_def::loop_father.

Referenced by build_scop_bbs_1().

static void analyze_drs_in_stmts ( )
static
   Analyze all the data references of STMTS and add them to the
   GBB_DATA_REFS vector of BB.  
static int build_alias_set_optimal_p ( )
static
   Uses DFS component number as representative of alias-sets. Also tests for
   optimality by verifying if every connected component is a clique. Returns
   true (1) if the above test is true, and false (0) otherwise.  
     Verify if the DFS numbering results in optimal solution.  
         Get all vertices whose DFS component number is the same as i.  
         Now test if the vertices in 'vertices' form a clique, by testing
         for edges among each pair.  
                 Check if the two vertices are connected by iterating
                 through all the edges which have one of these are source.  

Referenced by build_base_obj_set_for_drs().

static void build_base_obj_set_for_drs ( )
static
   Group each data reference in DRS with its base object set num.  

References data_reference::aux, build_alias_set_optimal_p(), free_gimple_bb(), and free_poly_bb().

static void build_loop_iteration_domains ( scop_p  scop,
struct loop loop,
int  nb,
isl_set *  outer,
isl_set **  doms 
)
static
   Builds the constraint polyhedra for LOOP in SCOP.  OUTER_PH gives
   the constraints for the surrounding loops.  
     0 <= loop_i 
     loop_i <= cst_nb_iters 
     loop_i <= expr_nb_iters 
             Insert in the context the constraints from the
             estimation of the number of iterations NIT and the
             symbolic number of iterations (involving parameter
             names) NB_ITERS.  First, build the affine expression
             "NIT - NB_ITERS" and then say that it is positive,
             i.e., NIT approximates NB_ITERS: "NIT >= NB_ITERS".  
static void build_pbb_drs ( )
static
   Build the data references for PBB.  
static void build_pbb_scattering_polyhedrons ( isl_aff *  static_sched,
poly_bb_p  pbb,
int  scattering_dimensions 
)
static
   Converts the STATIC_SCHEDULE of PBB into a scattering polyhedron.
   We generate SCATTERING_DIMENSIONS scattering dimensions.

   CLooG 0.15.0 and previous versions require, that all
   scattering functions of one CloogProgram have the same number of
   scattering dimensions, therefore we allow to specify it.  This
   should be removed in future versions of CLooG.

   The scattering polyhedron consists of these dimensions: scattering,
   loop_iterators, parameters.

   Example:

   | scattering_dimensions = 5
   | used_scattering_dimensions = 3
   | nb_iterators = 1
   | scop_nb_params = 2
   |
   | Schedule:
   |   i
   | 4 5
   |
   | Scattering polyhedron:
   |
   | scattering: {s1, s2, s3, s4, s5}
   | loop_iterators: {i}
   | parameters: {p1, p2}
   |
   | s1  s2  s3  s4  s5  i   p1  p2  1
   | 1   0   0   0   0   0   0   0  -4  = 0
   | 0   1   0   0   0  -1   0   0   0  = 0
   | 0   0   1   0   0   0   0   0  -5  = 0  
         Textual order inside this loop.  
         Iterations of this loop.  
static void build_poly_dr ( )
static
   Build data accesses for DR in PBB.  

References dr_may_alias_p().

void build_poly_scop ( )
   Builds the polyhedral representation for a SESE region.  
     FIXME: This restriction is needed to avoid a problem in CLooG.
     Once CLooG is fixed, remove this guard.  Anyways, it makes no
     sense to optimize a scop containing only PBBs that do not belong
     to any loops.  
     Record all conditions in REGION.  
     Rewrite out of SSA only after having translated the
     representation to the polyhedral representation to avoid scev
     analysis failures.  That means that these functions will insert
     new data references that they create in the right place.  
     This SCoP has been translated to the polyhedral
     representation.  
static void build_scop_bbs ( )
static
   Gather the basic blocks belonging to the SCOP.  
static void build_scop_bbs_1 ( )
static
   Recursive helper function for build_scops_bbs.  

References all_non_dominated_preds_marked_p().

static void build_scop_context ( )
static
   Build the context of the SCOP.  The context usually contains extra
   constraints that are added to the iteration domains that constrain
   some parameters.  
static void build_scop_drs ( )
static
   Build data references in SCOP.  
     Remove all the PBBs that do not have data references: these basic
     blocks are not handled in the polyhedral representation.  
         TODO: Add support when building alias set is not optimal.  
     When debugging, enable the following code.  This cannot be used
     in production compilers.  
static void build_scop_iteration_domain ( )
static
   Build the iteration domains: the loops belonging to the current
   SCOP, and that vary for the execution of the current basic block.
   Returns false if there is no loop in SCOP.  
static void build_scop_scattering ( )
static
@verbatim 

Build for BB the static schedule.

The static schedule is a Dewey numbering of the abstract syntax tree: http://en.wikipedia.org/wiki/Dewey_Decimal_Classification

The following example informally defines the static schedule:

A for (i: ...) { for (j: ...) { B C }

for (k: ...) { D E } } F

Static schedules for A to F:

DEPTH 0 1 2 A 0 B 1 0 0 C 1 0 1 D 1 1 0 E 1 1 1 F 2

     We have to start schedules at 0 on the first component and
     because we cannot compare_prefix_loops against a previous loop,
     prefix will be equal to zero, and that index will be
     incremented before copying.  
static tree close_phi_written_to_memory ( )
static
   When the result of a CLOSE_PHI is written to a memory location,
   return a pointer to that memory reference, otherwise return
   NULL_TREE.  
                 FIXME: this restriction is for id-{24,25}.f and
                 could be handled by duplicating the computation of
                 array indices before the loop of the close_phi.  
               Fallthru.  

References gsi_commit_edge_inserts(), loop_in_sese_p(), rewrite_commutative_reductions_out_of_ssa_loop(), scev_reset_htab(), update_ssa(), and verify_loop_closed_ssa().

Referenced by translate_scalar_reduction_to_array_for_stmt().

static int compare_bb_depths ( )
static
   Compare the depth of two basic_block's P1 and P2.  
static isl_pw_aff* create_pw_aff_from_tree ( )
static
   Returns a linear expression for tree T evaluated in PBB.  
static tree create_zero_dim_array ( )
static
   Creates a zero dimension array of the same type as VAR.  
static gimple detect_commutative_reduction ( scop_p  scop,
gimple  stmt,
vec< gimple > *  in,
vec< gimple > *  out 
)
static
   Detect commutative and associative scalar reductions belonging to
   the SCOP starting at the loop closed phi node STMT.  Return the phi
   node of the reduction cycle, or NULL.  
         Note that loop close phi nodes should have a single argument
         because we translated the representation into a canonical form
         before Graphite: see canonicalize_loop_closed_ssa_form.  

References dr_indices_valid_in_loop(), for_each_index(), gimple_phi_arg_def(), and loop_containing_stmt().

static gimple detect_commutative_reduction_arg ( tree  lhs,
gimple  stmt,
tree  arg,
vec< gimple > *  in,
vec< gimple > *  out 
)
static
   Detect commutative and associative scalar reductions starting at
   the STMT.  Return the phi node of the reduction cycle, or NULL.  

References gimple_phi_arg_def(), gimple_phi_num_args(), and scalar_close_phi_node_p().

static gimple detect_commutative_reduction_assign ( gimple  stmt,
vec< gimple > *  in,
vec< gimple > *  out 
)
static
   Detect commutative and associative scalar reductions starting at
   STMT.  Return the phi node of the reduction cycle, or NULL.  
static bool dr_indices_valid_in_loop ( )
static
   Helper function for for_each_index.  For each INDEX of the data
   reference REF, returns true when its indices are valid in the loop
   nest LOOP passed in as DATA.  

Referenced by detect_commutative_reduction().

static bool dr_same_base_object_p ( const struct data_reference dr1,
const struct data_reference dr2 
)
static
   Check if DR1 and DR2 are in the same object set.  
static void dump_alias_graphs ( )
static
   Dump to file the alias graphs for the data references in DRS.  
static edge edge_initial_value_for_loop_phi ( )
static
   Return the argument of the loop PHI that is the initial value coming
   from outside the loop.  
static isl_pw_aff* extract_affine ( scop_p  ,
tree  ,
__isl_take isl_space *  space 
)
static
static isl_pw_aff* extract_affine ( )
static
   Extract an affine expression from the tree E in the scop S.  
         No need to wrap a single integer.  
static isl_pw_aff* extract_affine_chrec ( )
static
   Extract an affine expression from the chain of recurrence E.  
     Before multiplying, make sure that the result is affine.  

Referenced by parameter_index_in_region_1().

static isl_pw_aff* extract_affine_gmp ( )
static
   Extract an affine expression from the gmp constant G.  

Referenced by extract_affine_name().

static isl_pw_aff* extract_affine_int ( )
static
   Extract an affine expression from the integer_cst E.  

Referenced by set_index().

static isl_pw_aff* extract_affine_mul ( )
static
   Extract an affine expression from the mult_expr E.  

Referenced by parameter_index_in_region_1().

static isl_pw_aff* extract_affine_name ( )
static
   Extract an affine expression from the ssa_name E.  

References extract_affine_gmp(), g, and tree_int_to_gmp().

static void find_params_in_bb ( )
static
   Find parameters with respect to REGION in BB. We are looking in memory
   access functions, conditions and loop bounds.  
     Find parameters in the access functions of data references.  
     Find parameters in conditional statements.  
static void find_scop_parameters ( )
static
   Record the parameters used in the SCOP.  A variable is a parameter
   in a scop if it does not vary during the execution of that scop.  
     Find the parameters used in the loop bounds.  
     Find the parameters used in data accesses.  

References chrec_contains_undetermined(), g, loop::inner, number_of_latch_executions(), scalar_evolution_in_region(), and tree_int_to_gmp().

static gimple follow_inital_value_to_phi ( )
static
   Return a loop phi node that corresponds to a reduction containing LHS.  

References gimple_assign_lhs(), gimple_phi_result(), gsi_after_labels(), gsi_for_stmt(), gsi_next(), insert_stmts(), and unshare_expr().

static gimple follow_ssa_with_commutative_ops ( )
static
   Return a loop phi node that corresponds to a reduction containing LHS.  

References edge_def::dest, gimple_phi_arg_def(), gimple_phi_arg_edge(), gimple_phi_num_args(), loop_depth(), basic_block_def::loop_father, and edge_def::src.

Referenced by split_reduction_stmt().

static void free_data_refs_aux ( )
static
static void free_gimple_bb ( )
static
   Frees GBB.  

Referenced by build_base_obj_set_for_drs().

void free_scops ( )
   Deletes all scops in SCOPS.  
static void graphite_sort_dominated_info ( )
static
   Sort the basic blocks from DOM such that the first are the ones at
   a deepest loop level.  
static gimple_stmt_iterator gsi_for_phi_node ( )
static
   Return a gsi at the position of the phi node STMT.  
static void handle_scalar_deps_crossing_scop_limits ( )
static
   For every definition DEF in the SCOP that is used outside the scop,
   insert a closing-scop definition in the basic block just after this
   SCOP.  
     Insert in the empty BB just after the scop a use of DEF such
     that the rewrite of cross_bb_scalar_dependences won't insert
     arrays everywhere else.  
static tree initial_value_for_loop_phi ( )
static
   Return the argument of the loop PHI that is the initial value coming
   from outside the loop.  
static void insert_out_of_ssa_copy ( )
static
   Insert the assignment "RES := EXPR" just after AFTER_STMT.  
static void insert_stmts ( scop_p  scop,
gimple  stmt,
gimple_seq  stmts,
gimple_stmt_iterator  insert_gsi 
)
static
   Insert STMT at the end of the STMTS sequence and then insert the
   statements from STMTS at INSERT_GSI and call analyze_drs_in_stmts
   on STMTS.  

Referenced by follow_inital_value_to_phi().

static bool is_reduction_operation_p ( )
inlinestatic
   Return true when stmt is a reduction operation.  
static isl_id* isl_id_for_dr ( )
static
   Return an ISL identifier for the data reference DR.  
     Data references all get the same isl_id.  They need to be comparable
     and are distinguished through the first dimension, which contains the
     alias set number.  
static isl_id* isl_id_for_pbb ( )
static
   Return an ISL identifier for the polyhedral basic block PBB.  

References poly_bb::domain, pbb_dim_iter_domain(), and poly_bb::schedule.

static isl_id* isl_id_for_ssa_name ( )
static
   Return an ISL identifier from the name of the ssa_name E.  

References dom.

static int nb_data_writes_in_bb ( )
static
   Return the number of data references in BB that write in
   memory.  

References phi_contains_arg().

static int nb_pbbs_in_loops ( )
static
   Returns the number of pbbs that are in loops contained in SCOP.  
static gimple_bb_p new_gimple_bb ( )
static
   Store the GRAPHITE representation of BB.  
static void new_pbb_from_pbb ( )
static
   Creates a poly_bb_p for basic_block BB from the existing PBB.  
     The INDEX of PBB in SCOP_BBS.  
static loop_p outermost_loop_in_sese_1 ( )
static
   Same as outermost_loop_in_sese, returns the outermost loop
   containing BB in REGION, but makes sure that the returned loop
   belongs to the REGION, and so this returns the first loop in the
   REGION when the loop containing BB does not belong to REGION.  
     When the basic block BB does not belong to a loop in the region,
     return the first loop in the region.  
static int parameter_index_in_region ( )
static
   When the parameter NAME is in REGION, returns its index in
   SESE_PARAMS.  Otherwise this function inserts NAME in SESE_PARAMS
   and returns the index of NAME.  
static int parameter_index_in_region_1 ( )
inlinestatic
   When parameter NAME is in REGION, returns its index in SESE_PARAMS.
   Otherwise returns -1.  

References chrec_dont_know, extract_affine_chrec(), extract_affine_mul(), and type().

Referenced by wrap().

static isl_map* pdr_add_alias_set ( )
static
   Add a constrain to the ACCESSES polyhedron for the alias set of
   data reference DR.  ACCESSP_NB_DIMS is the dimension of the
   ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
   domain.  

References array_ref_low_bound(), array_ref_up_bound(), DR_NUM_DIMENSIONS, and DR_REF.

static isl_set* pdr_add_data_dimensions ( )
static
   Add constrains representing the size of the accessed data to the
   ACCESSES polyhedron.  ACCESSP_NB_DIMS is the dimension of the
   ACCESSES polyhedron, DOM_NB_DIMS is the dimension of the iteration
   domain.  
         XXX The PPL code dealt separately with
         subscript - low >= 0 and high - subscript >= 0 in case one of
         the two bounds isn't known.  Do the same here?  
             1-element arrays at end of structures may extend over
             their declared size.  
             high >= 0 
             low <= sub_i <= high 
static isl_map* pdr_add_memory_accesses ( )
static
   Add to ACCESSES polyhedron equalities defining the access functions
   to the memory.  ACCESSP_NB_DIMS is the dimension of the ACCESSES
   polyhedron, DOM_NB_DIMS is the dimension of the iteration domain.
   PBB is the poly_bb_p that contains the data reference DR.  
static size_t phi_arg_in_outermost_loop ( )
static
   Returns the index of the PHI argument defined in the outermost
   loop.  
static bool phi_contains_arg ( )
static
   Returns true when PHI contains an argument ARG.  

References edge_def::dest, gimple_phi_arg_edge(), loop_depth(), basic_block_def::loop_father, and edge_def::src.

Referenced by nb_data_writes_in_bb().

static void propagate_expr_outside_region ( )
static
   For a definition DEF in REGION, propagates the expression EXPR in
   all the uses of DEF outside REGION.  

Referenced by insert_out_of_ssa_copy_on_edge(), and rewrite_reductions_out_of_ssa().

static bool reduction_phi_p ( )
static
   Returns true when the phi node at position PSI is a reduction phi
   node in REGION.  Otherwise moves the pointer PSI to the next phi to
   be considered.  
         PRE introduces phi nodes like these, for an example,
         see id-5.f in the fortran graphite testsuite:

         # prephitmp.85_265 = PHI <prephitmp.85_258(33), prephitmp.85_265(18)>
     All the other cases are considered reductions.  

References remove_simple_copy_phi().

static void remove_gbbs_in_scop ( )
static
   Deletes all gimple bbs in SCOP.  

References free_scop(), and free_sese().

static void remove_invariant_phi ( )
static
   Removes an invariant phi node at position PSI by inserting on the
   loop ENTRY edge the assignment RES = INIT.  
static void remove_phi ( )
static
   Removes the PHI node and resets all the debug stmts that are using
   the PHI_RESULT.  
static void remove_simple_copy_phi ( )
static
   Removes a simple copy phi node "RES = phi (INIT, RES)" at position
   PSI by inserting on the loop ENTRY edge assignment "RES = INIT".  

Referenced by reduction_phi_p().

static void rewrite_close_phi_out_of_ssa ( )
static
   Rewrite out of SSA the reduction phi node at PSI by creating a zero
   dimension array for it.  
     Note that loop close phi nodes should have a single argument
     because we translated the representation into a canonical form
     before Graphite: see canonicalize_loop_closed_ssa_form.  
     The phi node can be a non close phi node, when its argument is
     invariant, or a default definition.  
     If res is scev analyzable and is not a scalar value, it is safe
     to ignore the close phi node: it will be code generated in the
     out of Graphite pass.  
static void rewrite_commutative_reductions_out_of_ssa ( )
static
   Rewrites all the commutative reductions from SCOP out of SSA.  
static bool rewrite_commutative_reductions_out_of_ssa_close_phi ( scop_p  scop,
gimple  close_phi 
)
static
   Rewrites out of SSA a commutative reduction at CLOSE_PHI.  Returns
   true when something has been changed.  
static bool rewrite_commutative_reductions_out_of_ssa_loop ( scop_p  scop,
loop_p  loop 
)
static
   Rewrites all the commutative reductions from LOOP out of SSA.
   Returns true when something has been changed.  

Referenced by close_phi_written_to_memory().

static void rewrite_cross_bb_scalar_dependence ( scop_p  scop,
tree  zero_dim_array,
tree  def,
gimple  use_stmt 
)
static
   Rewrite the scalar dependence of DEF used in USE_STMT with a memory
   read from ZERO_DIM_ARRAY.  
static bool rewrite_cross_bb_scalar_deps ( )
static
   Rewrite the scalar dependences crossing the boundary of the BB
   containing STMT with an array.  Return true when something has been
   changed.  

References gimple_vdef(), gsi_end_p(), gsi_next(), gsi_start_bb(), and gsi_stmt().

static void rewrite_cross_bb_scalar_deps_out_of_ssa ( )
static
   Rewrite out of SSA all the reduction phi nodes of SCOP.  
     Create an extra empty BB after the scop.  
static void rewrite_degenerate_phi ( )
static
   Rewrite the degenerate phi node at position PSI from the degenerate
   form "x = phi (y, y, ..., y)" to "x = y".  
static void rewrite_phi_out_of_ssa ( )
static
   Rewrite out of SSA the reduction phi node at PSI by creating a zero
   dimension array for it.  
         Avoid the insertion of code in the loop latch to please the
         pattern matching of the vectorizer.  
static void rewrite_reductions_out_of_ssa ( )
static
static bool scalar_close_phi_node_p ( )
static
   Returns true when PHI is a loop close phi node.  
     Note that loop close phi nodes should have a single argument
     because we translated the representation into a canonical form
     before Graphite: see canonicalize_loop_closed_ssa_form.  

Referenced by detect_commutative_reduction_arg().

static void scan_tree_for_params ( )
static
   In the context of sese S, scan the expression E and translate it to
   a linear expression C.  When parsing a symbolic multiplication, K
   represents the constant multiplier of an expression containing
   parameters.  
static bool scop_ivs_can_be_represented ( )
static
   Can all ivs be represented by a signed integer?
   As CLooG might generate negative values in its expressions, signed loop ivs
   are required in the backend. 
static isl_map* set_index ( )
static
   Assign the affine expression INDEX to the output dimension POS of
   MAP and return the result.  

References scop::context, and extract_affine_int().

static bool simple_copy_phi_p ( )
inlinestatic
   Returns true when the phi node at PSI is of the form "a = phi (a, x)".  
static gimple single_pred_cond_non_loop_exit ( )
static
   Returns a COND_EXPR statement when BB has a single predecessor, the
   edge between BB and its predecessor is not a loop exit edge, and
   the last statement of the single predecessor is a COND_EXPR.  

References edge_def::flags, sese_dom_walker::m_cases, sese_dom_walker::m_conditions, and single_pred_edge().

static edge split_pbb ( )
static
   Splits at STMT the basic block BB represented as PBB in the
   polyhedral form.  
static basic_block split_reduction_stmt ( )
static
   Splits STMT out of its current BB.  This is done for reduction
   statements for which we want to ignore data dependences.  
     Do not split basic blocks with no writes to memory: the reduction
     will be the only write to memory.  
         Or if we have already marked BB as a reduction.  
     Split once more only when the reduction stmt is not the only one
     left in the original BB.  
     A part of the data references will end in a different basic block
     after the split: move the DRs from the original GBB to the newly
     created GBB1.  

References follow_ssa_with_commutative_ops().

Referenced by translate_scalar_reduction_to_array_for_stmt().

static void translate_scalar_reduction_to_array ( scop_p  scop,
vec< gimple in,
vec< gimple out 
)
static
   Rewrite out of SSA the reduction described by the loop phi nodes
   IN, and the close phi nodes OUT.  IN and OUT are structured by loop
   levels like this:

   IN: stmt, loop_n, ..., loop_0
   OUT: stmt, close_n, ..., close_0

   the first element is the reduction statement, and the next elements
   are the loop and close phi nodes of each of the outer loops.  
static void translate_scalar_reduction_to_array_for_stmt ( scop_p  scop,
tree  red,
gimple  stmt,
gimple  loop_phi 
)
static
   Translate the scalar reduction statement STMT to an array RED
   knowing that its recursive phi node is LOOP_PHI.  

References close_phi_written_to_memory(), pbb_from_bb(), and split_reduction_stmt().

static void tree_int_to_gmp ( )
inlinestatic
@verbatim 

Conversion of SESE regions to Polyhedra. Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Sebastian Pop sebas.nosp@m.tian.nosp@m..pop@.nosp@m.amd..nosp@m.com.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   Assigns to RES the value of the INTEGER_CST T.  

Referenced by extract_affine_name(), and find_scop_parameters().

static gimple_bb_p try_generate_gimple_bb ( )
static
   Generates a polyhedral black box only if the bb contains interesting
   information.  
static bool used_outside_reduction ( )
static
   Returns true when DEF is used outside the reduction cycle of
   LOOP_PHI.  
     In LOOP, DEF should be used only in LOOP_PHI.  
static isl_pw_aff* wrap ( )
static
   Compute pwaff mod 2^width.  

References parameter_index_in_region_1().

static bool write_alias_graph_to_ascii_dimacs ( FILE *  file,
char *  comment,
vec< data_reference_p drs 
)
inlinestatic
   Write to FILE the alias graph of data references in DIMACS format.  
static bool write_alias_graph_to_ascii_dot ( FILE *  file,
char *  comment,
vec< data_reference_p drs 
)
inlinestatic
   Write to FILE the alias graph of data references in DOT format.  
     First print all the vertices.  

References add_edge().

static bool write_alias_graph_to_ascii_ecc ( FILE *  file,
char *  comment,
vec< data_reference_p drs 
)
inlinestatic
   Write to FILE the alias graph of data references in ECC format.  

References vertex::component, vertex::pred, graph_edge::pred_next, graph_edge::src, and graph::vertices.