GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | eqn_d |
struct | omega_pb_d |
Macros | |
#define | OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS) |
#define | OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS) |
#define | OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS) |
#define | pos_infinity (0x7ffffff) |
#define | neg_infinity (-0x7ffffff) |
Typedefs | |
typedef struct eqn_d * | eqn |
typedef struct omega_pb_d * | omega_pb |
Enumerations | |
enum | omega_result { omega_false = 0, omega_true = 1, omega_unknown = 2, omega_simplify = 3 } |
enum | omega_eqn_color { omega_black = 0, omega_red = 1 } |
Variables | |
void(* | omega_when_reduced )(omega_pb) |
#define neg_infinity (-0x7ffffff) |
#define OMEGA_MAX_EQS PARAM_VALUE (PARAM_OMEGA_MAX_EQS) |
Referenced by omega_add_zero_geq().
#define OMEGA_MAX_GEQS PARAM_VALUE (PARAM_OMEGA_MAX_GEQS) |
Referenced by omega_add_zero_geq().
#define OMEGA_MAX_VARS PARAM_VALUE (PARAM_OMEGA_MAX_VARS) |
Source code for an implementation of the Omega test, an integer programming algorithm for dependence analysis, by William Pugh, appeared in Supercomputing '91 and CACM Aug 92.
This code has no license restrictions, and is considered public domain.
Changes copyright (C) 2005-2013 Free Software Foundation, Inc. Contributed by Sebastian Pop sebas tian .pop@ inri a.fr
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/.
Referenced by omega_add_zero_geq(), and omega_copy_eqn().
#define pos_infinity (0x7ffffff) |
typedef struct omega_pb_d * omega_pb |
enum omega_eqn_color |
enum omega_result |
void debug | ( | omega_pb_d & | ref | ) |
void debug | ( | omega_pb_d * | ptr | ) |
void debug_omega_problem | ( | omega_pb | ) |
|
inlinestatic |
Allocate a new equality with all coefficients 0, and tagged with COLOR. Return the index of this equality in problem PB.
References omega_pb_d::forwarding_address, omega_pb_d::num_vars, omega_pb_d::var, and omega_pb_d::variables_initialized.
Referenced by subscript_dependence_tester_1().
|
inlinestatic |
Allocate a new inequality with all coefficients 0, and tagged with COLOR. Return the index of this inequality in problem PB.
References omega_pb_d::eqs, omega_pb_d::forwarding_address, omega_pb_d::geqs, omega_free_eqns(), OMEGA_MAX_EQS, OMEGA_MAX_GEQS, OMEGA_MAX_VARS, omega_pb_d::subs, and omega_pb_d::var.
Referenced by subscript_dependence_tester_1().
|
inlinestatic |
Allocate N equations with S variables.
omega_pb omega_alloc_problem | ( | int | , |
int | |||
) |
enum omega_result omega_constrain_variable_sign | ( | omega_pb | pb, |
enum omega_eqn_color | color, | ||
int | var, | ||
int | sign | ||
) |
Unprotects VAR and simplifies PB.
void omega_constrain_variable_value | ( | omega_pb | pb, |
enum omega_eqn_color | color, | ||
int | var, | ||
int | value | ||
) |
Add an equation "VAR = VALUE" with COLOR to PB.
References eqn_d::coef, and omega_pb_d::eqs.
void omega_convert_eq_to_geqs | ( | omega_pb | , |
int | eq | ||
) |
|
inlinestatic |
E1 = E2, make a copy of E2 into E1. Equations contain S variables.
References eqn_d::coef, omega_init_eqn_zero(), and OMEGA_MAX_VARS.
|
inlinestatic |
Copy omega problems: P1 = P2.
Referenced by subscript_dependence_tester_1().
int omega_count_red_equations | ( | omega_pb | ) |
enum omega_result omega_eliminate_redundant | ( | omega_pb | , |
bool | |||
) |
|
inlinestatic |
Free N equations from array EQ.
Referenced by omega_add_zero_geq().
|
inlinestatic |
Free problem PB.
Referenced by omega_setup_subscript().
|
inlinestatic |
Initialize E = 0. Equation E contains S variables.
Referenced by normalize_omega_problem(), omega_copy_eqn(), and verify_omega_pb().
void omega_initialize | ( | void | ) |
Initialization of the Omega solver.
|
inlinestatic |
Initialize variables for problem PB.
Referenced by omega_count_red_equations().
void omega_negate_geq | ( | omega_pb | , |
int | |||
) |
void omega_no_procedure | ( | omega_pb | ) |
void omega_pretty_print_problem | ( | FILE * | , |
omega_pb | |||
) |
|
inlinestatic |
Print to FILE equality E from PB.
References eqn_d::color, eqn_d::key, and eqn_d::touched.
Referenced by omega_count_red_equations().
|
inlinestatic |
Print to FILE inequality E from PB.
Referenced by coalesce(), normalize_omega_problem(), omega_count_red_equations(), and omega_eliminate_red().
|
inlinestatic |
Print to FILE inequality E from PB.
void omega_print_problem | ( | FILE * | , |
omega_pb | |||
) |
void omega_print_red_equations | ( | FILE * | , |
omega_pb | |||
) |
int omega_query_variable_signs | ( | omega_pb | pb, |
int | i, | ||
int | dd_lt, | ||
int | dd_eq, | ||
int | dd_gt, | ||
int | lower_bound, | ||
int | upper_bound, | ||
bool * | dist_known, | ||
int * | dist | ||
) |
For problem PB, return an integer that represents the classic data dependence direction in function of the DD_LT, DD_EQ and DD_GT bit masks that are added to the result. When DIST_KNOWN is true, DIST is set to the classic data dependence distance. LOWER_BOUND and UPPER_BOUND are bounds on the value of variable I, for example, it is possible to narrow the iteration domain with safe approximations of loop counts, and thus discard some data dependences that cannot occur.
|
inlinestatic |
Return true when variable I in problem PB is a safe variable.
The constant of an equation is not a variable.
References omega_print_eqn().
Referenced by bswap(), and omega_solve_eq().
enum omega_result omega_simplify_approximate | ( | omega_pb | ) |
enum omega_result omega_simplify_problem | ( | omega_pb | ) |
enum omega_result omega_solve_problem | ( | omega_pb | , |
enum | omega_result | ||
) |
void omega_unprotect_variable | ( | omega_pb | , |
int | var | ||
) |
|
inlinestatic |
Return true when variable I in problem PB is a wildcard.
References omega_print_eqn().
|
inlinestatic |
Returns true when E is an inequality with a single variable.
Referenced by adding_equality_constraint().
void(* omega_when_reduced)(omega_pb) |