PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "genC.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 "matrix.h"
#include "ri.h"
#include "graph.h"
#include "paf_ri.h"
#include "database.h"
#include "parser_private.h"
#include "ri-util.h"
#include "workspace-util.h"
#include "prettyprint.h"
#include "constants.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "paf-util.h"
#include "effects-generic.h"
#include "alias-classes.h"
#include "static_controlize.h"
Go to the source code of this file.
Macros | |
#define | entity_assigned_by_array_p(ent) (gen_find_eq(ent, assigned_var) != chunk_undefined) |
Typedefs | |
typedef void * | arc_label |
Name : utils.c Package : static_controlize.c Author : Arnauld LESERVOT Date : 27/04/93 Modified : Documents: "Implementation du Data Flow Graph dans Pips" Comments : More... | |
typedef void * | vertex_label |
Functions | |
list | stco_same_loops (statement_mapping in_map, statement in_s, statement in_s2) |
====================================================================== More... | |
int | stco_renumber_code (statement in_st, int in_ct) |
================================================================ More... | |
expression | sc_opposite_exp_of_conjunction (expression exp, list *ell) |
================================================================ More... | |
bool | splc_positive_relation_p (expression exp, list *ell) |
================================================================ More... | |
list | ndf_normalized_test (expression exp, list *ell) |
================================================================ More... | |
expression | normalize_test_leaves (expression exp, list *ell) |
================================================================ More... | |
expression | sc_conditional (expression exp, list *ell) |
================================================================ More... | |
list | loops_to_indices (list l) |
================================================================ More... | |
bool | splc_linear_expression_p (expression exp, list *ell) |
================================================================ More... | |
bool | splc_linear_expression_list_p (list l, list *ell) |
================================================================ More... | |
bool | splc_linear_access_to_arrays_p (list l, list *ell) |
================================================================ More... | |
string | print_structurals (list l) |
================================================================ More... | |
list | sc_list_of_exp_dup (list l) |
================================================================ More... | |
list | sc_list_of_entity_dup (list l) |
================================================================ More... | |
list | sc_list_of_loop_dup (list l) |
================================================================ More... | |
loop | sc_loop_dup (loop l) |
================================================================ More... | |
list | make_undefined_list () |
================================================================ More... | |
int | in_forward_defined (entity ent, list *swfl) |
================================================================ More... | |
bool | in_forward_defined_p (entity ent, list *swfl) |
================================================================ More... | |
void | verify_structural_parameters (list the_list, list *swfl) |
================================================================ More... | |
list | sc_entity_to_formal_integer_parameters (entity f) |
================================================================ More... | |
bool | sp_linear_expression_p (expression exp) |
================================================================ More... | |
bool | splc_feautrier_expression_p (expression exp, list *ell) |
================================================================ More... | |
bool | sp_feautrier_expression_p (expression exp) |
================================================================ More... | |
entity | sp_feautrier_scalar_assign_call (call c) |
================================================================ More... | |
bool | get_sp_of_call_p (call c, hash_table fst, list *swfl) |
================================================================ More... | |
static void | substitute_variable_by_expression (expression e, hash_table fst) |
rewriting of forward_substitute_in_exp, in_loop,... More... | |
void | forward_substitute_in_anyloop (void *pl, hash_table fst) |
void | forward_substitute_in_exp (expression *pe, hash_table fst) |
void | forward_substitute_in_call (call *pc, hash_table fst) |
bool | normalizable_loop_p (loop l) |
bool normalizable_loop_p(loop l) Returns true if "l" has a constant step. More... | |
bool | normalizable_loop_p_retrieved (loop l) |
Code retrieved from revision 14476, transformations/loop_normalize.c. More... | |
bool | is_expression_in_list (expression exp, list l) |
State if an expression OR part of that expression corresponds to one of the entity of the list l. More... | |
bool | get_reference_assignments (statement s, list *l) |
Allows the static_controlize phase to keep and update a list containing all the variables of the program assigned directly or indirectly by an array. More... | |
Variables | |
list | Gstructure_parameters |
Global variables More... | |
list | assigned_var |
================================================================= More... | |
#define entity_assigned_by_array_p | ( | ent | ) | (gen_find_eq(ent, assigned_var) != chunk_undefined) |
typedef void* arc_label |
Name : utils.c Package : static_controlize.c Author : Arnauld LESERVOT Date : 27/04/93 Modified :
Documents: "Implementation du Data Flow Graph dans Pips" Comments :
Ansi includes
Newgen includes C3 includes
Pips includes
Types arc_label and vertex_label must be defined although they are not used
typedef void* vertex_label |
void forward_substitute_in_anyloop | ( | void * | pl, |
hash_table | fst | ||
) |
Would it be better to loop over with HASH_MAP or to check every reference?
pl | l |
fst | st |
Definition at line 1139 of file utils.c.
References expression_domain, gen_context_multi_recurse(), gen_true(), pl, and substitute_variable_by_expression().
Referenced by loop_normalize_of_statement(), and static_controlize_statement().
void forward_substitute_in_call | ( | call * | pc, |
hash_table | fst | ||
) |
Would it be better to loop over with HASH_MAP or to check every reference?
pc | c |
fst | st |
Definition at line 1157 of file utils.c.
References call_consistent_p(), expression_domain, gen_context_multi_recurse(), gen_true(), pips_assert, and substitute_variable_by_expression().
Referenced by loop_normalize_of_statement(), and static_controlize_statement().
void forward_substitute_in_exp | ( | expression * | pe, |
hash_table | fst | ||
) |
Would it be better to loop over with HASH_MAP or to check every reference?
pe | e |
fst | st |
Definition at line 1148 of file utils.c.
References expression_domain, gen_context_multi_recurse(), gen_true(), and substitute_variable_by_expression().
Referenced by adg_dataflowgraph(), loop_normalize_of_statement(), and static_controlize_statement().
Allows the static_controlize phase to keep and update a list containing all the variables of the program assigned directly or indirectly by an array.
Definition at line 1300 of file utils.c.
References assignment_statement_p(), call_arguments, CDR, chunk_undefined, entity_undefined_p, expression_syntax, expression_to_entity(), gen_car(), gen_cons(), gen_find_eq(), instruction_call, instruction_call_p, is_expression_in_list(), NIL, reference_indices, sp_feautrier_scalar_assign_call(), statement_instruction, syntax_reference, and syntax_reference_p.
Referenced by static_controlize_statement().
bool get_sp_of_call_p | ( | call | c, |
hash_table | fst, | ||
list * | swfl | ||
) |
================================================================
bool get_sp_of_call_p( (call) c, fst) AL 04/93 Updates the global variables Gstructure_parameters and Gforward_substitute_table according to the type of call. Returns true if the call has to be modified (redefinition of a structural parameter), false in all the other cases.
AP, sep 95 : Gforward_substitute_table is no longer a global variable, we pass it as an argument.
I: not too sure about the false parameter...
fst | st |
swfl | bool get_sp_of_call_p( (call) c, fst) AL 04/93 Updates the global variables Gstructure_parameters and Gforward_substitute_table according to the type of call. Returns true if the call has to be modified (redefinition of a structural parameter), false in all the other cases. |
AP, sep 95 : Gforward_substitute_table is no longer a global variable, we pass it as an argument. forward substitute table
Definition at line 1056 of file utils.c.
References ADD_ELEMENT_TO_LIST, call_arguments, call_function, CAR, ENTITY, ENTITY_READ_P, ENTITY_SP_P, entity_undefined, exp, EXPRESSION, expression_int_scalar(), Gstructure_parameters, hash_put(), in_forward_defined(), in_forward_defined_p(), make_entity_expression(), make_nsp_entity(), MAPL, NIL, pips_debug, print_structurals(), sp_feautrier_scalar_assign_call(), Words_Regular_Call(), and words_to_string().
================================================================
int in_forward_defined( (entity) ent ) AL 30/08/93 Returns the number of entities ent in the list Gscalar_written_forward.
ent | nt |
swfl | wfl |
Definition at line 836 of file utils.c.
References CAR, cons::cdr, NIL, and pips_debug.
Referenced by get_sp_of_call_p().
================================================================
bool in_forward_defined_p( (entity) ent ) AL 04/93 Returns true if ent is in global variable Gscalar_written_forward.
ent | nt |
swfl | wfl |
Definition at line 855 of file utils.c.
References entity_undefined, gen_find_eq(), pips_debug, and print_structurals().
Referenced by get_sp_of_call_p().
bool is_expression_in_list | ( | expression | exp, |
list | l | ||
) |
State if an expression OR part of that expression corresponds to one of the entity of the list l.
This function was specifically designed in order to find if an expression is using one of the variable/entity listed in l. The function considers that the list only contains scalar variables.
exp | xp |
Definition at line 1200 of file utils.c.
References application_arguments, application_function, call_arguments, cast_expression, chunk_undefined, exp, expression_syntax, expression_to_entity(), FOREACH, gen_find_eq(), is_expression_in_list(), is_syntax_application, is_syntax_call, is_syntax_cast, is_syntax_range, is_syntax_reference, is_syntax_sizeofexpression, is_syntax_subscript, is_syntax_va_arg, NIL, range_increment, range_lower, range_upper, ref, reference_indices, reference_variable, sizeofexpression_expression, subscript_array, subscript_indices, syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, and syntax_va_arg.
Referenced by get_reference_assignments(), and is_expression_in_list().
================================================================
list loops_to_indices((loop) l ) AL 04/93 Returns indices of the loop -list l.
Definition at line 630 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, ENTITY, LOOP, loop_index, MAPL, NIL, and pips_debug.
Referenced by splc_linear_expression_p().
list make_undefined_list | ( | void | ) |
================================================================
list make_undefined_list( ) AL 04/93 Duplicates a list of 2 undefined statements.
FI: this is no longer possible. List elements must be defined. Maybe empty/nop statements could be used instead?
Definition at line 815 of file utils.c.
References ADD_ELEMENT_TO_LIST, entity_empty_label(), make_continue_statement(), NIL, pips_debug, and STATEMENT.
Referenced by loop_normalize_of_loop(), and loop_normalize_of_statement().
list ndf_normalized_test | ( | expression | exp, |
list * | ell | ||
) |
================================================================
list ndf_normalized_test( (expression) exp, (list) *ell) AL 04/93 Returns a list of positive linear forms from an input expression which is a logical combinaison of affine forms of structural parameters and of loop counters.
Redon FND propagation : see document.
We propagate an Exclusive Normal Disjunctive Form
if (ENTITY_OR_P( fun )) { list not_l1, not_l2, l1, l2;
l1 = ndf_normalized_test(arg1, ell); l2 = ndf_normalized_test( arg2, ell); not_l1 = ndf_normalized_test( MakeUnaryCall(ENTITY_NOT, arg1), ell ); not_l2 = ndf_normalized_test( MakeUnaryCall(ENTITY_NOT, arg2), ell );
MAPL( exp_ptr, { expression S1 = EXPRESSION(CAR( exp_ptr )); MAPL( exp_ptr2, { expression T1 = EXPRESSION(CAR( exp_ptr )); ADD_ELEMENT_TO_LIST( ret_list, EXPRESSION, MakeBinaryCall( ENTITY_AND, S1, T1 ) ); }, l2); }, not_l1 );
MAPL( exp_ptr, { expression S1 = EXPRESSION(CAR( exp_ptr )); MAPL( exp_ptr2, { expression T1 = EXPRESSION(CAR( exp_ptr )); ADD_ELEMENT_TO_LIST( ret_list, EXPRESSION, MakeBinaryCall( ENTITY_AND, S1, T1 ) ); }, l2); }, l1 );
MAPL( exp_ptr, { expression S1 = EXPRESSION(CAR( exp_ptr )); MAPL( exp_ptr2, { expression T1 = EXPRESSION(CAR( exp_ptr )); ADD_ELEMENT_TO_LIST( ret_list, EXPRESSION, MakeBinaryCall( ENTITY_AND, S1, T1 ) ); }, not_l2); }, l1 );
return( ret_list ); }
exp | xp |
ell | ll |
Definition at line 306 of file utils.c.
References ADD_ELEMENT_TO_LIST, call_arguments, call_function, CAR, CDR, copy_expression(), ENDP, ENTITY_AND, ENTITY_AND_P, ENTITY_GE, ENTITY_NOT_P, ENTITY_OR_P, exp, EXPRESSION, expression_syntax, expression_to_string(), expression_undefined, int_to_expression(), is_syntax_call, make_op_exp(), MakeBinaryCall(), MAPL, MINUS_OPERATOR_NAME, ndf_normalized_test(), NIL, pips_debug, sc_opposite_exp_of_conjunction(), splc_positive_relation_p(), syntax_call, and syntax_tag.
Referenced by ndf_normalized_test(), and sc_conditional().
bool normalizable_loop_p(loop l) Returns true if "l" has a constant step.
Definition at line 1172 of file utils.c.
References expression_constant_p(), loop_range, pips_debug, and range_increment.
Referenced by loop_normalize_of_loop().
Code retrieved from revision 14476, transformations/loop_normalize.c.
Code to be retrieved: I suppose you need a constant increment?
Definition at line 1183 of file utils.c.
References loop_index, loop_range, normalizable_and_linear_loop_p(), and ok.
expression normalize_test_leaves | ( | expression | exp, |
list * | ell | ||
) |
================================================================
expression normalize_test_leaves((expression) exp, (list) *ell) AL 04/93 If exp is linear in structurals and loop-counters, it returns the same expression with linear positive forms
We return expression_undefined if we can not normalize
exp | xp |
ell | ll |
Definition at line 445 of file utils.c.
References ADD_ELEMENT_TO_LIST, call_arguments, call_function, CAR, CDR, copy_expression(), ENTITY_AND, ENTITY_EQUAL_P, ENTITY_EQUIV_P, ENTITY_GE, ENTITY_GREATER_OR_EQUAL_P, ENTITY_GREATER_THAN_P, ENTITY_LESS_OR_EQUAL_P, ENTITY_LESS_THAN_P, ENTITY_NON_EQUAL_P, ENTITY_NON_EQUIV_P, ENTITY_NOT, ENTITY_NOT_P, ENTITY_OR, ENTITY_RELATIONAL_OPERATOR_P, ENTITY_STRICT_LOGICAL_OPERATOR_P, exp, EXPRESSION, expression_syntax, expression_to_string(), expression_undefined, int_to_expression(), is_syntax_call, make_op_exp(), MakeBinaryCall(), MakeUnaryCall(), MAPL, MINUS_OPERATOR_NAME, NIL, normalize_test_leaves(), pips_debug, splc_linear_expression_p(), syntax_call, and syntax_tag.
Referenced by normalize_test_leaves(), and sc_conditional().
================================================================
char* print_structurals( (list) l ) AL 04/93 Prints structural parameters.
Definition at line 732 of file utils.c.
References strdup(), words_entity_list(), and words_to_string().
Referenced by get_sp_of_call_p(), in_forward_defined_p(), static_controlize(), static_controlize_statement(), static_controlize_unstructured(), and verify_structural_parameters().
expression sc_conditional | ( | expression | exp, |
list * | ell | ||
) |
================================================================
expression sc_conditional( (expression) exp, (list) *ell ) AL 04/93 If exp is linear in structurals and loop-counters, it returns the same expression with a normal disjunctive form.
exp | xp |
ell | ll |
Definition at line 596 of file utils.c.
References CAR, CDR, copy_expression(), ENTITY_OR, exp, EXPRESSION, expression_syntax, expression_to_string(), expression_undefined, is_syntax_call, MakeBinaryCall(), MAPL, ndf_normalized_test(), NIL, normalize_test_leaves(), pips_debug, and syntax_tag.
Referenced by static_controlize_statement().
================================================================
list sc_entity_to_formal_integer_parameters((entity) f) This is a strict copy of entity_to_formal_integer_parameters from semantics/interprocedural.c . This function is copied here to keep locality of local functions to each pass.
FI: Well, but it was modified to handle all integer scalar variables and a bug was added because a COMMON has a RAM storage (OK, this could be discussed). I add a test on type_variable_p()
Definition at line 900 of file utils.c.
References CAR, code_declarations, CONS, ENTITY, entity_code(), entity_integer_scalar_p(), entity_module_p(), entity_storage, entity_type, f(), MAPL, NIL, pips_assert, storage_formal_p, storage_ram_p, and type_variable_p.
Referenced by static_controlize().
================================================================
list sc_list_of_entity_dup( (list) l ) AL 04/93 Duplicates a list of entities.
Definition at line 761 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, ENTITY, MAPL, NIL, and pips_debug.
Referenced by static_controlize_call(), static_controlize_statement(), and static_controlize_unstructured().
================================================================
list sc_list_of_exp_dup( (list) l ) AL 04/93 Duplicates a list of expressions.
Definition at line 741 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, copy_expression(), ENDP, exp, EXPRESSION, NIL, pips_debug, and POP.
Referenced by static_controlize_call(), static_controlize_statement(), and static_controlize_unstructured().
================================================================
list sc_list_of_loop_dup( (list) l ) AL 04/93 Duplicates a list of loops. See Newgen gen_copy_seq()?
Definition at line 778 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, LOOP, MAPL, NIL, and pips_debug.
Referenced by static_controlize_statement(), and static_controlize_unstructured().
================================================================
list sc_loop_dup( (list) l ) AL 04/93 Duplicates a loop with sharing of the loop_body and sharing of the loop locals.
Definition at line 796 of file utils.c.
References copy_range(), loop_body, loop_execution, loop_index, loop_label, loop_locals, loop_range, make_loop(), and pips_debug.
expression sc_opposite_exp_of_conjunction | ( | expression | exp, |
list * | ell | ||
) |
================================================================
expression sc_opposite_exp_of_conjunction(expression exp, (list) *ell) AL 08/19/93 Input : exp a conjunction of linear expressions Output : simplified value of NOT( exp )
exp | xp |
ell | ll |
Definition at line 236 of file utils.c.
References call_arguments, call_function, CAR, CDR, ENTITY_AND_P, ENTITY_GE, ENTITY_OR, exp, EXPRESSION, expression_syntax, expression_undefined, int_to_expression(), is_syntax_call, make_op_exp(), MakeBinaryCall(), MINUS_OPERATOR_NAME, NIL, pips_debug, sc_opposite_exp_of_conjunction(), splc_positive_relation_p(), syntax_call, and syntax_tag.
Referenced by ndf_normalized_test(), and sc_opposite_exp_of_conjunction().
bool sp_feautrier_expression_p | ( | expression | exp | ) |
================================================================
bool sp_feautrier_expression_p( (expression) exp) Returns true if exp quasi affine form.
exp | xp |
Definition at line 995 of file utils.c.
References call_arguments, call_function, CAR, CDR, ENTITY_DIVIDE_P, exp, EXPRESSION, expression_constant_p(), expression_syntax, expression_to_string(), expression_undefined, is_syntax_call, pips_debug, sp_feautrier_expression_p(), sp_linear_expression_p(), syntax_call, and syntax_tag.
Referenced by sp_feautrier_expression_p(), sp_feautrier_scalar_assign_call(), and static_controlize_statement().
================================================================
entity sp_feautrier_scalar_assign_call( (call) c ) Returns the left-hand-side entity if it is an assignement of a linear combinaison of structural parameters.
Definition at line 1029 of file utils.c.
References call_arguments, CAR, CDR, entity_name, entity_undefined, EXPRESSION, pips_debug, scalar_assign_call(), and sp_feautrier_expression_p().
Referenced by get_reference_assignments(), and get_sp_of_call_p().
bool sp_linear_expression_p | ( | expression | exp | ) |
================================================================
bool sp_linear_expression_p( (expression) exp) Returns true if the expression is a linear combinaison of structural parameters.
exp | xp |
Definition at line 928 of file utils.c.
References ENTITY_SP_P, exp, expression_normalized, expression_to_string(), is_normalized_complex, NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, pips_debug, Svecteur::succ, term_cst, unnormalize_expression(), Svecteur::var, and VECTEUR_NUL_P.
Referenced by sp_feautrier_expression_p().
bool splc_feautrier_expression_p | ( | expression | exp, |
list * | ell | ||
) |
================================================================
bool splc_feautrier_expression_p( (expression) exp ) Returns true if exp quasi affine form in structural parameters and in surrounding loop-counters.
exp | xp |
ell | ll |
Definition at line 962 of file utils.c.
References call_arguments, call_function, CAR, CDR, ENTITY_DIVIDE_P, exp, EXPRESSION, expression_constant_p(), expression_syntax, expression_to_string(), expression_undefined, is_syntax_call, pips_debug, splc_feautrier_expression_p(), splc_linear_expression_p(), syntax_call, and syntax_tag.
Referenced by splc_feautrier_expression_p(), and static_controlize_loop().
================================================================
bool splc_linear_access_to_arrays_p((list) l, (list) *ell) AL 04/93 Returns true if all expressions exp are structural parameters and loop counters linear functions.
ell | ll |
Definition at line 700 of file utils.c.
References call_arguments, CAR, exp, EXPRESSION, expression_syntax, is_syntax_call, is_syntax_reference, MAPL, NIL, pips_debug, reference_indices, splc_linear_access_to_arrays_p(), splc_linear_expression_list_p(), syntax_call, syntax_reference, and syntax_tag.
Referenced by splc_linear_access_to_arrays_p(), and static_controlize_call().
================================================================
bool splc_linear_expression_list_p((list) l) AL 04/93 Returns true if all expressions exp are structural parameters and loop counters linear functions.
ell | ll |
Definition at line 682 of file utils.c.
References CAR, exp, EXPRESSION, MAPL, pips_debug, and splc_linear_expression_p().
Referenced by splc_linear_access_to_arrays_p().
bool splc_linear_expression_p | ( | expression | exp, |
list * | ell | ||
) |
================================================================
bool splc_linear_expression_p((expression) exp) AL 04/93 Returns true if exp is linear in structural parameters and loop counters.
exp | xp |
ell | ll |
Definition at line 648 of file utils.c.
References chunk_undefined, entity_assigned_by_array_p, ENTITY_SP_P, exp, expression_normalized, expression_to_string(), gen_find_eq(), is_normalized_complex, loops_to_indices(), NORMALIZE_EXPRESSION, normalized_linear, normalized_tag, pips_debug, Svecteur::succ, term_cst, unnormalize_expression(), Svecteur::var, and VECTEUR_NUL_P.
Referenced by normalize_test_leaves(), splc_feautrier_expression_p(), splc_linear_expression_list_p(), and splc_positive_relation_p().
bool splc_positive_relation_p | ( | expression | exp, |
list * | ell | ||
) |
================================================================
bool splc_positive_relation_p((expression) exp, list *ell) AL 04/93 Returns true if exp is an affine form of structural parameters and of loop-counters.
exp | xp |
ell | ll |
Definition at line 282 of file utils.c.
References call_arguments, call_function, CAR, CDR, ENTITY_GREATER_OR_EQUAL_P, exp, EXPRESSION, expression_equal_integer_p(), expression_syntax, expression_to_string(), is_syntax_call, pips_debug, splc_linear_expression_p(), syntax_call, and syntax_tag.
Referenced by ndf_normalized_test(), and sc_opposite_exp_of_conjunction().
================================================================
int stco_renumber_code( (statement) in_st, (int) in_ct ) AL 25/10/93 Input : A statement in_st and a begin count number in_ct. Output : Renumber statement_number in an textual order and return the last number attributed.
I've removed many renumbering since it is done by a deeper call to stco_renumber_code() and renumbering sequences kill an assert in the prettyprinter...
Renumber all the statement but the sequence:
in_st | n_st |
in_ct | n_ct |
Definition at line 137 of file utils.c.
References CAR, CONTROL, control_map_get_blocs(), control_statement, count, gen_free_list(), gen_nreverse(), instruction_block, instruction_goto, instruction_loop, instruction_tag, instruction_test, instruction_unstructured, is_instruction_block, is_instruction_call, is_instruction_expression, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, loop_body, MAPL, NIL, pips_debug, pips_internal_error, STATEMENT, statement_instruction, statement_number, stco_renumber_code(), test_false, test_true, and unstructured_control.
Referenced by static_controlize(), and stco_renumber_code().
list stco_same_loops | ( | statement_mapping | in_map, |
statement | in_s, | ||
statement | in_s2 | ||
) |
======================================================================
utils.c
list stco_same_loops( in_map, in_s, in_s2 ) AL 25/10/93 Input : A static_control mapping on statements and 2 statements. Output : A list of loops common to in_s and in_s2.
in_map | n_map |
in_s | n_s |
in_s2 | n_s2 |
Definition at line 98 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, ENDP, GET_STATEMENT_MAPPING, LOOP, loop_body, NIL, pips_debug, POP, statement_ordering, and static_control_loops.
Referenced by stco_common_loops_of_statements().
|
static |
rewriting of forward_substitute_in_exp, in_loop,...
FI: what was the initial semantics? Substitute the left hand sides only?
see transformations/induction_substitution.c
It's a simple case because the loop indices cannot be written within the loop bounds
FI: let's take care of memory leaks later...
The hash_table could contain syntax objects...
Definition at line 1122 of file utils.c.
References expression_syntax, expression_undefined_p, hash_get(), reference_variable, syntax_reference, and syntax_reference_p.
Referenced by forward_substitute_in_anyloop(), forward_substitute_in_call(), and forward_substitute_in_exp().
================================================================
void verify_structural_parameters( (list) l ) AL 04/93 Updates the global variable Gstructure_parameters. 'l' is a list of entities, which are structural-parameters candidates. An entity will be a structural parameter if it is a candidate and if it is not written forward.
the_list | he_list |
swfl | wfl |
Definition at line 873 of file utils.c.
References ADD_ELEMENT_TO_LIST, CAR, chunk_undefined, ENTITY, gen_find_eq(), Gstructure_parameters, MAPL, pips_debug, and print_structurals().
Referenced by static_controlize().
|
extern |
=================================================================
static_control static_controlize_statement((statement) s) AL 05/93 Computes s's static_control
Definition at line 207 of file static_controlize.c.
Referenced by static_controlize(), and static_controlize_statement().
|
extern |
Global variables
extern list Gscalar_written_forward;
Global variables
Definition at line 81 of file static_controlize.c.
Referenced by get_sp_of_call_p(), static_controlize(), static_controlize_call(), static_controlize_statement(), static_controlize_unstructured(), and verify_structural_parameters().