PIPS
|
#include <stdio.h>
#include <setjmp.h>
#include <string.h>
#include <stdlib.h>
#include "genC.h"
#include "ri.h"
#include "constants.h"
#include "ri-util.h"
#include "misc.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "union.h"
#include "matrix.h"
#include "complexity_ri.h"
#include "database.h"
#include "dg.h"
#include "parser_private.h"
#include "property.h"
#include "reduction.h"
#include "tiling.h"
#include "text.h"
#include "text-util.h"
#include "graph.h"
#include "paf_ri.h"
#include "paf-util.h"
#include "pipsdbm.h"
#include "resources.h"
#include "array_dfg.h"
#include "pip.h"
#include "static_controlize.h"
#include "scheduling.h"
Go to the source code of this file.
Typedefs | |
typedef dfg_arc_label | arc_label |
C3 includes More... | |
typedef dfg_vertex_label | vertex_label |
Functions | |
entity | create_named_entity (char *name) |
===================================================================== More... | |
void | fprint_bdt_with_stat (FILE *fp, bdt obj) |
=========================================================================== More... | |
bool | my_contrainte_normalize (Pcontrainte c, bool is_egalite) |
========================================================================= More... | |
bool | my_inegalite_normalize (Pcontrainte ineg) |
============================================================== More... | |
Psysteme | my_sc_normalize (Psysteme ps) |
============================================================== More... | |
Psysteme | predicate_to_system (predicate p) |
================================================================= More... | |
schedule | true_copy_schedule (schedule s) |
================================================================= More... | |
bdt | true_copy_bdt (bdt b) |
===================================================================== More... | |
bool | system_contains_var (Psysteme ps, Variable var) |
===================================================================== More... | |
void | poly_chg_var (Ppolynome pp, Variable v_old, Variable v_new) |
================================================================= More... | |
Psysteme | suppress_sc_in_sc (Psysteme in_ps1, Psysteme in_ps2) |
====================================================================== More... | |
void | analyze_expression (expression *e, int *d) |
===================================================================== More... | |
bool | exp_equals_p (expression e1, expression e2) |
====================================================================== More... | |
bool | list_of_exp_equals_p (list l1, list l2) |
====================================================================== More... | |
typedef dfg_arc_label arc_label |
typedef dfg_vertex_label vertex_label |
Definition at line 77 of file bdt_utils.c.
void analyze_expression | ( | expression * | e, |
int * | d | ||
) |
=====================================================================
void analyze_expression(e, d): this function analyzes an expression that is, it reduces the different components of the expression to the common denominator and make as many simplification as possible. ex: u + v - (u + 2*v)/3 => (2*u + v)/3 4*(u + v)/2 - v +w => 2*u + v + w
AC 93/12/14
We have to analyze the complex expression
case of + or -
case of an already normalized expression, do nothing
Definition at line 480 of file bdt_utils.c.
References ADD_ELEMENT_TO_LIST, call_arguments, call_function, CAR, cons::cdr, CDR, CONS, ENTITY_DIVIDE_P, ENTITY_MULTIPLY_P, ENTITY_PLUS_P, EXPRESSION, expression_constant_p(), expression_normalized, expression_syntax, expression_to_int(), int_to_expression(), is_normalized_complex, is_syntax_call, is_syntax_reference, make_call(), make_expression(), make_syntax(), NIL, NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, normalized_undefined, Pvecteur_to_expression(), sol_ppcm(), syntax_call, syntax_tag, unnormalize_expression(), VALUE_TO_INT, vect_add(), vect_div(), vect_multiply(), vect_pgcd_all(), and vect_substract().
Referenced by exp_equals_p(), get_m_coef(), include_trans_in_poly(), include_trans_on_LC_in_ref(), prepare_reindexing(), search_scc_bdt(), simplify_dimension(), and system_new_var_subst().
entity create_named_entity | ( | char * | name | ) |
=====================================================================
entity create_named_entity(name): create a scalar integer entity named "name".
AC 93/11/05
Definition at line 85 of file bdt_utils.c.
References BDT_MODULE_NAME, concatenate(), entity_domain, entity_type, entity_undefined, full_name, gen_find_tabulated(), is_basic_int, is_storage_rom, is_value_unknown, make_basic(), make_entity, make_storage(), make_value(), MakeTypeVariable(), MODULE_SEP_STRING, NIL, strdup(), type_undefined, and UU.
Referenced by add_x_list(), create_var_name(), include_trans_in_poly(), make_dual(), make_list_of_n(), make_polynome_Xe(), and make_x_list().
bool exp_equals_p | ( | expression | e1, |
expression | e2 | ||
) |
======================================================================
bool exp_equals_p(e1,e2): tests if two expressions are equal. This function is better than expression_equal_p() because it takes into account the case where the expressions are not linear.
AC 94/01/03
Definition at line 820 of file bdt_utils.c.
References analyze_expression(), call_arguments, CAR, EXPRESSION, expression_syntax, expression_undefined, NORMALIZE_EXPRESSION, normalized_linear, syntax_call, and vect_equal().
Referenced by list_of_exp_equals_1n_p(), and list_of_exp_equals_p().
void fprint_bdt_with_stat | ( | FILE * | fp, |
bdt | obj | ||
) |
===========================================================================
void fprint_bdt_with_stat(fp, obj): prints the bdt "obj" with the corresponding statement.
AC 94/02/12
Definition at line 115 of file bdt_utils.c.
References adg_number_to_statement(), bdt_schedules, bdt_undefined, CAR, CDR, crt_stmt, Ssysteme::egalites, entity_local_name(), exp, EXPRESSION, expression_to_string(), fprintf(), Ssysteme::inegalites, NIL, predicate_system, predicate_undefined, print_statement(), pu_egalite_fprint(), pu_inegalite_fprint(), SCHEDULE, schedule_dims, schedule_predicate, schedule_statement, and Scontrainte::succ.
Referenced by scheduling().
======================================================================
bool list_of_exp_equals_p(l1,l2): tests if two lists of expressions have all their terms equals. Beware, the equality of the length of the two lists is not checked !
AC 94/01/03
Definition at line 867 of file bdt_utils.c.
References CAR, CDR, exp_equals_p(), EXPRESSION, and NIL.
bool my_contrainte_normalize | ( | Pcontrainte | c, |
bool | is_egalite | ||
) |
=========================================================================
bool my_contrainte_normalize(Pcontrainte c, bool is_egalite): this is the same function as contrainte_normalize, except that it divides inequalities by the pgcd of all the terms, including the TCST one.
AC 93/12/23
Definition at line 192 of file bdt_utils.c.
References TCST, value_abs, value_mod, value_notzero_p, value_uminus, VALUE_ZERO, value_zero_p, vect_chg_coeff(), vect_clean(), vect_coeff(), vect_div(), and vect_pgcd_except().
Referenced by my_inegalite_normalize().
bool my_inegalite_normalize | ( | Pcontrainte | ineg | ) |
==============================================================
bool my_inegalite_normalize(Pcontrainte ineg): same function as inegalite_normalize except that it uses my_contrainte_nor- malize insteadof contrainte_normalize.
AC 93/12/23
Definition at line 239 of file bdt_utils.c.
References my_contrainte_normalize().
==============================================================
Psysteme my_sc_normalize(ps): that function suppresses redondant equations and reduce its equations to the pgcd. There is no test of faisability.
AC 93/12/23
normalisation de chaque equation
Definition at line 254 of file bdt_utils.c.
References eq, sc_creer_base(), sc_elim_db_constraints(), sc_elim_empty_constraints(), Scontrainte::succ, vect_normalize(), and Scontrainte::vecteur.
Referenced by make_causal_external(), make_causal_internal(), make_dual(), search_scc_bdt(), and simplify_bdt().
=================================================================
void poly_chg_var(pp, v_old, v_new) : change the variable "v_old" in the variable "v_new" in the polynom pp.
AC 93/11/04
Definition at line 399 of file bdt_utils.c.
References monome_term, NIL, polynome_monome, POLYNOME_NUL_P, polynome_succ, and vect_chg_var().
Referenced by include_trans_in_poly().
=================================================================
Psysteme predicate_to_system((predicate) p) : transform a predicate in a system.
AC 93/11/02
Definition at line 298 of file bdt_utils.c.
References predicate_system, and predicate_undefined.
Referenced by analyze_quast(), build_first_comb(), build_third_comb(), build_third_subcomb(), compatible_pc_p(), dataflows_on_reference(), get_predicate_system_of_node(), include_results_in_bdt(), make_causal_external(), make_causal_internal(), prepare_reindexing(), search_scc_bdt(), simplify_bdt(), and true_copy_schedule().
======================================================================
Psysteme suppress_sc_in_sc((Psysteme) in_ps1, (Psysteme) in_ps2) Input : 2 Psystemes. Output : Psysteme : Scan in_ps1 and remove from it Pcontraintes in in_ps2. No sharing, No remove input object. cf. function "adg_suppress_2nd_in_1st_ps" from array_dfg.c
AC 93/12/14
Definition at line 426 of file bdt_utils.c.
References contrainte_make(), CONTRAINTE_UNDEFINED, ok, sc_append(), sc_make(), Scontrainte::succ, vect_equal(), and Scontrainte::vecteur.
Referenced by simplify_bdt().
=====================================================================
bool system_contains_var(ps, var): test if a system contains the variable"var".
AC 94/01/04
Definition at line 382 of file bdt_utils.c.
References Ssysteme::base, base_contains_variable_p(), and sc_creer_base().
Referenced by include_parameters_in_sc().
=====================================================================
bdt true_copy_bdt(b): really copies a bdt b, cf. true_copy_schedule().
AC 93/12/21
Definition at line 354 of file bdt_utils.c.
References ADD_ELEMENT_TO_LIST, bdt_schedules, CAR, CDR, make_bdt(), NIL, SCHEDULE, and true_copy_schedule().
Referenced by build_bdt_null(), search_scc_bdt(), and write_resulting_bdt().
=================================================================
schedule true_copy_schedule( s ): really copies a schedule s. The function copy_schedule is not sufficient here because it doesn't copy the predicate properly for example.
AC 93/12/15
Definition at line 318 of file bdt_utils.c.
References ADD_ELEMENT_TO_LIST, CAR, CDR, copy_expression(), exp, EXPRESSION, lexp, make_predicate(), make_schedule(), NIL, predicate_to_system(), sc_dup(), schedule_dims, schedule_predicate, and schedule_statement.
Referenced by analyze_quast(), and true_copy_bdt().