Lines Matching refs:code
58 @code{LOOPS_MAY_HAVE_MULTIPLE_LATCHES} flag to the loop discovery,
68 tree. This tree is represented by the @code{struct loops} structure.
70 function. Each of the loops is represented in a @code{struct loop}
71 structure. Each loop is assigned an index (@code{num} field of the
72 @code{struct loop} structure), and the pointer to the loop is stored in
73 the corresponding field of the @code{larray} vector in the loops
75 empty (@code{NULL}) entries in the @code{larray} created by deleting
79 The entries of the @code{larray} field should not be accessed directly.
80 The function @code{get_loop} returns the loop description for a loop with
81 the given index. @code{number_of_loops} function returns number of
82 loops in the function. To traverse all loops, use @code{FOR_EACH_LOOP}
83 macro. The @code{flags} argument of the macro is used to determine
88 must be done separately after their creation. The @code{FOR_EACH_LOOP}
89 macro allocates temporary variables. If the @code{FOR_EACH_LOOP} loop
91 @code{FOR_EACH_LOOP_BREAK} macro must be used instead.
94 to (@code{loop_father}). For this reason, it is only possible to have
95 one @code{struct loops} structure initialized at the same time for each
96 CFG@. The global variable @code{current_loops} contains the
97 @code{struct loops} structure. Many of the loop manipulation functions
100 The loops are analyzed through @code{loop_optimizer_init} function. The
106 @item @code{LOOPS_MAY_HAVE_MULTIPLE_LATCHES}: If this flag is set, no
113 @item @code{LOOPS_HAVE_PREHEADERS}: Forwarder blocks are created in such
116 natural place where the code can be moved out of the loop, and ensures
118 @item @code{LOOPS_HAVE_SIMPLE_LATCHES}: Forwarder blocks are created to
125 @item @code{LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS}: Basic blocks and
128 @code{BB_IRREDUCIBLE_LOOP} and @code{EDGE_IRREDUCIBLE_LOOP} flags. The
132 @item @code{LOOPS_HAVE_RECORDED_EXITS}: The lists of exits are recorded
134 @code{get_loop_exit_edges}) more efficient. Some functions (e.g.,
135 @code{single_exit}) can be used only if the lists of exits are
140 @code{create_preheaders}, @code{force_single_succ_latches},
141 @code{mark_irreducible_loops} and @code{record_loop_exits}.
144 @code{loop_optimizer_finalize} function.
148 common tasks. On GIMPLE, @code{cleanup_tree_cfg_loop} function can be
150 @code{current_loops} is set.
158 the structures. @code{loop_father} field of each basic block contains
163 @item @code{header}, @code{latch}: Header and latch basic blocks of the
165 @item @code{num_nodes}: Number of basic blocks in the loop (including
167 @item @code{depth}: The depth of the loop in the loops tree, i.e., the
169 @item @code{outer}, @code{inner}, @code{next}: The super-loop, the first
180 @item @code{flow_loops_dump}: Dumps the information about loops to a
182 @item @code{verify_loop_structure}: Checks consistency of the loop
184 @item @code{loop_latch_edge}: Returns the latch edge of a loop.
185 @item @code{loop_preheader_edge}: If loops have preheaders, returns
187 @item @code{flow_loop_nested_p}: Tests whether loop is a sub-loop of
189 @item @code{flow_bb_inside_loop_p}: Tests whether a basic block belongs
191 @item @code{find_common_loop}: Finds the common super-loop of two loops.
192 @item @code{superloop_at_depth}: Returns the super-loop of a loop with
194 @item @code{tree_num_loop_insns}, @code{num_loop_insns}: Estimates the
196 @item @code{loop_exit_edge_p}: Tests whether edge is an exit from a
198 @item @code{mark_loop_exit_edges}: Marks all exit edges of all loops
199 with @code{EDGE_LOOP_EXIT} flag.
200 @item @code{get_loop_body}, @code{get_loop_body_in_dom_order},
201 @code{get_loop_body_in_bfs_order}: Enumerates the basic blocks in the
204 @item @code{single_exit}: Returns the single exit edge of the loop, or
205 @code{NULL} if the loop has more than one exit. You can only use this
207 @item @code{get_loop_exit_edges}: Enumerates the exit edges of a loop.
208 @item @code{just_once_each_iteration_p}: Returns true if the basic block
220 @item @code{flow_loop_tree_node_add}: Adds a node to the tree.
221 @item @code{flow_loop_tree_node_remove}: Removes a node from the tree.
222 @item @code{add_bb_to_loop}: Adds a basic block to a loop.
223 @item @code{remove_bb_from_loops}: Removes a basic block from loops.
230 @item @code{remove_path}: Removes an edge and all blocks it dominates.
231 @item @code{split_loop_exit_edge}: Splits exit edge of the loop,
242 @item @code{create_iv}: Creates a new induction variable. Only works on
243 GIMPLE@. @code{standard_iv_increment_position} can be used to find a
245 @item @code{duplicate_loop_to_header_edge},
246 @code{tree_duplicate_loop_to_header_edge}: These functions (on RTL and
249 unrolling or loop peeling. @code{can_duplicate_loop_p}
250 (@code{can_unroll_loop_p} on GIMPLE) must be true for the duplicated
252 @item @code{loop_version}, @code{tree_ssa_loop_version}: These function
258 @item @code{tree_unroll_loop}: Unrolls the loop, including peeling the
301 @code{rewrite_into_loop_closed_ssa} is used to rewrite SSA form to
302 LCSSA, and @code{verify_loop_closed_ssa} to check that the invariant of
316 @code{scev_initialize} must be used. To stop using SCEV,
317 @code{scev_finalize} should be used. SCEV analysis caches results in
319 most of the loop transformations, including removal of code. If such a
320 transformation is performed, @code{scev_reset} must be called to clean
324 @code{analyze_scalar_evolution} function. The returned SCEV however
327 recursive) references, @code{instantiate_parameters} or
328 @code{resolve_mixers} functions must be used.
329 @code{instantiate_parameters} is useful when you use the results of SCEV
334 @code{resolve_mixers} is useful if you work with only one loop at a
335 time, and if you possibly need to create code based on the value of the
342 @code{SCEV_NOT_KNOWN}, used for SSA names whose value cannot be
343 expressed. The other one is @code{POLYNOMIAL_CHREC}. Polynomial chrec
347 @code{POLYNOMIAL_CHREC(base, step, loop)} if it is (in the specified
348 loop) equivalent to @code{x_1} in the following example
359 For example, if we compile C code and @code{x} has signed type, then the
367 @code{simple_iv} function may be used to analyze a value -- the result
377 in a loop L, @code{iv_analysis_loop_init} function must be called on L.
378 After the analysis (possibly calling @code{iv_analysis_loop_init} for
379 several loops) is finished, @code{iv_analysis_done} should be called.
384 @item @code{iv_analyze}: Analyzes a single register used in the given
388 @item @code{iv_analyze_result}: Analyzes result of the assignment in the
390 @item @code{iv_analyze_expr}: Analyzes a more complicated expression.
391 All its operands are analyzed by @code{iv_analyze}, and hence they must
395 The description of the induction variable is provided in @code{struct
397 complicated; if the value of the @code{extend} field is not
398 @code{UNKNOWN}, the value of the induction variable in the i-th
405 with the following exception: if @code{first_special} is true, then the
406 value in the first iteration (when @code{i} is zero) is @code{delta +
407 mult * base}. However, if @code{extend} is equal to @code{UNKNOWN},
408 then @code{first_special} must be false, @code{delta} 0, @code{mult} 1
415 The function @code{get_iv_value} can be used to perform these
434 @item @code{assumptions}: If this condition is false, the rest of
436 @item @code{noloop_assumptions} on RTL, @code{may_be_zero} on GIMPLE: If
438 @item @code{infinite}: If this condition is true, the loop is infinite.
440 finiteness of the loop are included in @code{assumptions}.
441 @item @code{niter_expr} on RTL, @code{niter} on GIMPLE: The expression
448 On GIMPLE, the results are stored to @code{struct tree_niter_desc}
450 given exit can be determined using @code{number_of_iterations_exit}
451 function. On RTL, the results are returned in @code{struct niter_desc}
453 @code{check_simple_exit}. There are also functions that pass through
455 number of iterations -- @code{find_loop_niter} on GIMPLE and
456 @code{find_simple_exit} on RTL@. Finally, there are functions that
459 @code{number_of_latch_executions} on GIMPLE and @code{get_simple_loop_desc}
465 @code{number_of_latch_executions} works only for single-exit loops.
466 The function @code{number_of_cond_exit_executions} can be used to
468 loop (i.e., the @code{number_of_latch_executions} increased by one).
474 The code for the data dependence analysis can be found in
478 loop is @code{compute_data_dependences_for_loop}. This function is
484 vector of data references is of size @code{n}, the vector containing the
485 dependence relations will contain @code{n*n} elements. However if the
489 inserts a single @code{chrec_dont_know} in the dependence relation
503 is @code{data_reference}, where @code{data_reference_p} is a name of a
508 @item @code{base_object_info}: Provides information about the base object
513 @code{a.b[i][j]}, the base object is @code{a.b} and the access functions,
515 @code{@{i_init, + i_step@}_1, @{j_init, +, j_step@}_2}.
517 @item @code{first_location_in_loop}: Provides information about the first
531 The access function of the pointer access is @code{@{0, + 4B@}_for2}
532 relative to @code{p + i}. The access functions of the array are
533 @code{@{i_init, + i_step@}_for1} and @code{@{j_init, +, j_step@}_for2}
534 relative to @code{a}.
543 If both @code{a} and @code{b} are represented as arrays, compare
544 @code{a.base_object} and @code{b.base_object};
547 Else if both @code{a} and @code{b} are represented as pointers, compare
548 @code{a.first_location} and @code{b.first_location};
551 However, if @code{a} and @code{b} are represented differently, only try
559 @code{data_dependence_relation} and the shorter name for a pointer to
560 such a structure is @code{ddr_p}. This structure contains:
564 @item a tree node @code{are_dependent} that is set to @code{chrec_known}
566 data references, @code{chrec_dont_know} if the analysis was not able to
568 dependence between these data references, and @code{are_dependent} is
569 set to @code{NULL_TREE} if there exist a dependence relation between the
571 given in the @code{subscripts}, @code{dir_vects}, and @code{dist_vects}
575 @item an array @code{subscripts} that contains a description of each
578 dimension. For example, given @code{A[f1][f2][f3]} and
579 @code{B[g1][g2][g3]}, there are three subscripts: @code{(f1, g1), (f2,
581 @item two arrays @code{dir_vects} and @code{dist_vects} that contain
584 @item an array of loops @code{loop_nest} that contains the loops to
589 data dependence analysis are available: @code{dump_ddrs} prints with a
591 @code{dump_dist_dir_vectors} prints only the classical distance and
593 @code{dump_data_references} prints the details of the data references
610 @code{gcc_loopnest_to_lambda_loopnest} is provided. If the loop cannot
613 Once a @code{lambda_loopnest} is obtained from the conversion function,
614 it can be transformed by using @code{lambda_loopnest_transform}, which
621 @code{lambda_transform_legal_p}.
624 @code{lambda_loopnest_to_gcc_loopnest}. This function will modify the
644 elimination: a linear constraint system containing @code{n} variables
645 is reduced to a linear constraint system with @code{n-1} variables.
655 @code{omega_solve_problem}.