PIPS
static_controlize.c File Reference
#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 "properties.h"
#include "matrix.h"
#include "ri.h"
#include "graph.h"
#include "paf_ri.h"
#include "database.h"
#include "ri-util.h"
#include "workspace-util.h"
#include "prettyprint.h"
#include "constants.h"
#include "misc.h"
#include "control.h"
#include "text-util.h"
#include "pipsdbm.h"
#include "resources.h"
#include "paf-util.h"
#include "static_controlize.h"
+ Include dependency graph for static_controlize.c:

Go to the source code of this file.

Data Structures

struct  IOIntrinsicDescriptor
 the following data structure describes an io intrinsic function: its name More...
 

Typedefs

typedef void * arc_label
 Name : static_controlize.c package : static_controlize Author : Arnauld LESERVOT Date : May 93 Modified : Documents : "Implementation du Data Flow Graph dans Pips" Comments : More...
 
typedef void * vertex_label
 
typedef struct IOIntrinsicDescriptor IOIntrinsicDescriptor
 the following data structure describes an io intrinsic function: its name More...
 

Functions

static_control static_controlize_call (call c)
 ================================================================ More...
 
static_control static_controlize_loop (loop l)
 ================================================================= More...
 
static_control static_controlize_forloop (forloop fl)
 ================================================================= More...
 
static_control static_controlize_whileloop (whileloop wl)
 ================================================================= More...
 
static_control static_controlize_statement (statement s)
 
static_control static_controlize_unstructured (unstructured u)
 ================================================================= More...
 
static bool io_filter (statement st)
 ====================================================================== More...
 
bool static_controlize (string mod_name)
 ================================================================= More...
 
list loop_normalize_of_loop (loop l, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
 ================================================================= More...
 
list loop_normalize_of_statement (statement s, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
 ================================================================= More...
 
void loop_normalize_of_unstructured (unstructured u, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
 ================================================================= More...
 

Variables

list Gstructure_parameters
 Global Variables
More...
 
static list Genclosing_loops
 
static list Genclosing_tests
 
static list Gscalar_written_forward
 
static hash_table Gforward_substitute_table
 
statement_mapping Gstatic_control_map
 
list assigned_var = NIL
 ================================================================= More...
 
static IOIntrinsicDescriptor IOIntrinsicDescriptorTable []
 

Typedef Documentation

◆ arc_label

typedef void* arc_label

Name : static_controlize.c package : static_controlize Author : Arnauld LESERVOT Date : May 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

Definition at line 63 of file static_controlize.c.

◆ IOIntrinsicDescriptor

the following data structure describes an io intrinsic function: its name

◆ vertex_label

typedef void* vertex_label

Definition at line 64 of file static_controlize.c.

Function Documentation

◆ io_filter()

static bool io_filter ( statement  st)
static

======================================================================

bool io_filter(st)

Tests if the statement is a call to an IO function. In such a case, we put the statement inside a comment.

AP, oct 9th 1995

There can be no statement inside a call, so gen_recurse() do not need to go further.

Do not forget to move forbidden information associated with block:

Definition at line 430 of file static_controlize.c.

432 {
433  bool res_b;
434  instruction ins;
435 
436  res_b = true;
437  ins = statement_instruction(st);
438 
440  call ca = instruction_call(ins);
441  entity e = call_function(ca);
442 
443  /* There can be no statement inside a call, so gen_recurse() do not
444  need to go further. */
445  res_b = false;
446 
448  const char* s = entity_local_name(e);
450  bool found = false;
451 
452  while ((pid->name != NULL) && (!found)) {
453  if (strcmp(pid->name, s) == 0) {
454  char *comment;
455  statement stat;
456  list lstat;
457 
458  // BUG: missing overflow checks
459  comment = (char*) malloc(64);
460  sprintf(comment, "C %s\n",
461  words_to_string(Words_Call(ca, 0, true, true)));
462 
463  pips_assert("no buffer overflow", strlen(comment)<64);
464 
468  comment,
470  NIL, // No local declarations
471  NULL, // null or empty string...
473  lstat = CONS(STATEMENT, stat, NIL);
474 
476  /* Do not forget to move forbidden information associated with
477  block: */
479 
480  found = true;
481  }
482  pid += 1;
483  }
484  }
485  }
486 
487  return(res_b);
488 }
statement make_statement(entity a1, intptr_t a2, intptr_t a3, string a4, instruction a5, list a6, string a7, extensions a8, synchronization a9)
Definition: ri.c:2222
synchronization make_synchronization_none(void)
Definition: ri.c:2424
static void comment(string_buffer code, spoc_hardware_type hw, dagvtx v, int stage, int side, bool flip)
Definition: freia_spoc.c:52
void * malloc(YYSIZE_T)
instruction make_instruction_block(list statements)
Build an instruction block from a list of statements.
Definition: instruction.c:106
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
void fix_sequence_statement_attributes(statement)
Since blocks are not represented in Fortran, they cannot carry a label.
Definition: statement.c:2016
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
Definition: newgen-local.h:35
list Words_Call(call obj, int precedence, bool leftmost, bool is_a_subroutine)
Definition: misc.c:2597
#define STATEMENT_NUMBER_UNDEFINED
default values
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
entity entity_empty_label(void)
Definition: entity.c:1105
extensions empty_extensions(void)
extension.c
Definition: extension.c:43
#define value_tag(x)
Definition: ri.h:3064
#define call_function(x)
Definition: ri.h:709
@ is_value_intrinsic
Definition: ri.h:3034
@ is_instruction_call
Definition: ri.h:1474
#define instruction_tag(x)
Definition: ri.h:1511
#define statement_instruction(x)
Definition: ri.h:2458
#define instruction_call(x)
Definition: ri.h:1529
#define STATEMENT(x)
STATEMENT.
Definition: ri.h:2413
#define entity_initial(x)
Definition: ri.h:2796
static IOIntrinsicDescriptor IOIntrinsicDescriptorTable[]
the following data structure describes an io intrinsic function: its name
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
string words_to_string(cons *lw)
Definition: print.c:211

References call_function, comment(), CONS, empty_extensions(), entity_empty_label(), entity_initial, entity_local_name(), fix_sequence_statement_attributes(), instruction_call, instruction_tag, IOIntrinsicDescriptorTable, is_instruction_call, is_value_intrinsic, make_instruction_block(), make_statement(), make_synchronization_none(), malloc(), IOIntrinsicDescriptor::name, NIL, pips_assert, STATEMENT, statement_instruction, STATEMENT_NUMBER_UNDEFINED, STATEMENT_ORDERING_UNDEFINED, value_tag, Words_Call(), and words_to_string().

Referenced by static_controlize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loop_normalize_of_loop()

list loop_normalize_of_loop ( loop  l,
hash_table  fst,
list ell,
list etl,
list swfl,
int Gcount_nlc 
)

=================================================================

================================================================= list loop_normalize_of_loop((loop) l, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc) AL 04/93

FI/SG Question: why change the loop index when it is not necessary? To have a uniform behavior when it is necessary?

loop_body( l ) = make_block_with_stmt( loop_body( l ));

If it is not a constant step, we just normalize the loop body

new upper bound, or at least iteration count

Generate the new loop index and the new loop bounds

assume C

Generate the change of basis expression: the new index starts at 0 in C and 1 in Fortran:

old_index = rl + (new_index * ri) // C

old_index = rl + (new_index * ri) - ri // Fortran

Compute the value of the index when the loop is exited: exp_max

nub3 is not used any longer

FI: Why copy nub? it does not seem used anywhere else.

Parameters
fstst
ell================================================================= list loop_normalize_of_loop((loop) l, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc) AL 04/93

FI/SG Question: why change the loop index when it is not necessary? To have a uniform behavior when it is necessary? forward substitute table

Parameters
etl================================================================= list loop_normalize_of_loop((loop) l, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc) AL 04/93

FI/SG Question: why change the loop index when it is not necessary? To have a uniform behavior when it is necessary? enclosing loops list

Parameters
swfl================================================================= list loop_normalize_of_loop((loop) l, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc) AL 04/93

FI/SG Question: why change the loop index when it is not necessary? To have a uniform behavior when it is necessary? enclosing tests list

Parameters
Gcount_nlc================================================================= list loop_normalize_of_loop((loop) l, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc) AL 04/93

FI/SG Question: why change the loop index when it is not necessary? To have a uniform behavior when it is necessary? scalar written forward list

Definition at line 616 of file static_controlize.c.

623 {
624  entity index, nlc_ent, max_ent;
625  expression rl, ru, ri, nub, nlc_exp, exp_plus;
626  expression nub2, nub3, index_exp, new_index_exp;
628  range lr;
630  statement end_stmt = statement_undefined;
631  list stmt_list = NIL;
632 
633  pips_debug(4, "begin LOOP\n");
634 
636  /* loop_body( l ) = make_block_with_stmt( loop_body( l ));*/
638  index = loop_index( l );
639 
640  /* If it is not a constant step, we just normalize the loop body */
641  if(!normalizable_loop_p(l)) {
642  ADD_ELEMENT_TO_LIST(*swfl, ENTITY, index);
643  (void) loop_normalize_of_statement(loop_body( l ), fst, ell,
644  etl, swfl, Gcount_nlc);
645  return( make_undefined_list() );
646  }
647 
648  lr = loop_range( l );
649  rl = range_lower( lr );
650  ru = range_upper( lr );
651  ri = range_increment( lr );
652 
653  /* new upper bound, or at least iteration count */
657  copy_expression(ru),
658  copy_expression(rl)),
659  copy_expression(ri)),
660  copy_expression(ri));
661  nub2 = copy_expression(nub);
662 
663  ADD_ELEMENT_TO_LIST( stmt_list, STATEMENT, before_stmt );
664 
665  /* Generate the new loop index and the new loop bounds */
666  nlc_ent = make_nlc_entity(Gcount_nlc);
667  ADD_ELEMENT_TO_LIST(*swfl, ENTITY, nlc_ent);
668  nlc_exp = make_entity_expression( nlc_ent, NIL);
669  loop_index( l ) = nlc_ent;
671  range_lower( lr ) = int_to_expression( 1 );
672  range_upper( lr ) = nub2;
673  }
674  else {
675  /* assume C */
676  range_lower( lr ) = int_to_expression( 0 );
678  int_to_expression(1));
679  }
680  range_increment( lr ) = int_to_expression( 1 );
681 
682  /* Generate the change of basis expression: the new index starts at
683  0 in C and 1 in Fortran:
684 
685  old_index = rl + (new_index * ri) // C
686 
687  old_index = rl + (new_index * ri) - ri // Fortran
688 
689  */
690  new_index_exp = make_op_exp(MULTIPLY_OPERATOR_NAME,
691  copy_expression(ri),
692  nlc_exp);
694  new_index_exp = make_op_exp(MINUS_OPERATOR_NAME,
695  new_index_exp,
696  copy_expression(ri));
697  }
698  new_index_exp = make_op_exp(PLUS_OPERATOR_NAME,
699  new_index_exp,
700  copy_expression(rl));
701  hash_put(fst, (char*) index, (char*) new_index_exp);
702 
703  /* Compute the value of the index when the loop is exited: exp_max */
704  nub3 = copy_expression( nub );
705  if ( expression_constant_p( nub3 )) {
706  int upper = expression_to_int( nub3 );
707  if ( upper > 0 )
708  /* nub3 is not used any longer */
709  exp_max = int_to_expression( upper );
710  }
711  else {
714  entity_domain);
715  /* FI: Why copy nub? it does not seem used anywhere else. */
716  exp_max = make_max_exp(max_ent, copy_expression( nub ),
717  int_to_expression( 0 ));
718  }
719  if ( exp_max == expression_undefined )
720  exp_plus = copy_expression( rl );
721  else
722  exp_plus = make_op_exp(PLUS_OPERATOR_NAME,
724  copy_expression( ri ),
725  exp_max),
726  copy_expression( rl ));
727  index_exp = make_entity_expression( index, NIL );
728  end_stmt = make_assign_statement(copy_expression(index_exp), exp_plus );
730 
731  loop_normalize_of_statement(loop_body(l), fst , ell, etl, swfl, Gcount_nlc);
732 
733  hash_del(fst, (char*) index );
734  pips_debug(4, "end LOOP\n");
735  return( stmt_list );
736 }
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
list stmt_list
The "stmt_list" global variable is the list the assign statement of the program (with all fields empt...
Definition: adg_read_paf.c:144
string make_entity_fullname(const char *module_name, const char *local_name)
END_EOLE.
Definition: entity_names.c:230
statement make_block_with_stmt_if_not_already(statement)
Build a statement block from a statement if not already a statement block.
Definition: statement.c:768
entity get_current_module_entity(void)
Get the entity of the current module.
Definition: static.c:85
statement make_assign_statement(expression, expression)
Definition: statement.c:583
statement make_continue_statement(entity)
Definition: statement.c:953
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
Definition: hash.c:364
void * hash_del(hash_table htp, const void *key)
this function removes from the hash table pointed to by htp the couple whose key is equal to key.
Definition: hash.c:439
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
Definition: expression.c:2453
#define ADD_ELEMENT_TO_LIST(_list, _type, _element)
Definition: icfg-local.h:50
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
entity make_nlc_entity(int *Gcount_nlc)
================================================================
expression make_max_exp(entity ent, expression exp1, expression exp2)
================================================================
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
void * gen_find_tabulated(const char *, int)
Definition: tabulated.c:218
#define MAX_OPERATOR_NAME
#define MINUS_OPERATOR_NAME
#define PLUS_OPERATOR_NAME
#define DIVIDE_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
bool fortran_module_p(entity m)
Test if a module is in Fortran.
Definition: entity.c:2799
expression make_entity_expression(entity e, cons *inds)
Definition: expression.c:176
int expression_to_int(expression exp)
================================================================
Definition: expression.c:2205
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
expression make_op_exp(char *op_name, expression exp1, expression exp2)
================================================================
Definition: expression.c:2012
#define loop_body(x)
Definition: ri.h:1644
#define range_upper(x)
Definition: ri.h:2290
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define range_increment(x)
Definition: ri.h:2292
#define expression_undefined
Definition: ri.h:1223
#define loop_label(x)
Definition: ri.h:1646
#define range_lower(x)
Definition: ri.h:2288
#define loop_range(x)
Definition: ri.h:1642
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
#define loop_index(x)
Definition: ri.h:1640
#define statement_undefined
Definition: ri.h:2419
int Gcount_nlc
list loop_normalize_of_statement(statement s, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
=================================================================
list make_undefined_list(void)
================================================================
Definition: utils.c:815
bool normalizable_loop_p(loop)
bool normalizable_loop_p(loop l) Returns true if "l" has a constant step.
Definition: utils.c:1172

References ADD_ELEMENT_TO_LIST, copy_expression(), DIVIDE_OPERATOR_NAME, ENTITY, entity_domain, entity_empty_label(), expression_constant_p(), expression_to_int(), expression_undefined, fortran_module_p(), Gcount_nlc, gen_find_tabulated(), get_current_module_entity(), hash_del(), hash_put(), int_to_expression(), loop_body, loop_index, loop_label, loop_normalize_of_statement(), loop_range, make_assign_statement(), make_block_with_stmt_if_not_already(), make_continue_statement(), make_entity_expression(), make_entity_fullname(), make_max_exp(), make_nlc_entity(), make_op_exp(), make_undefined_list(), MAX_OPERATOR_NAME, MINUS_OPERATOR_NAME, MULTIPLY_OPERATOR_NAME, NIL, normalizable_loop_p(), pips_debug, PLUS_OPERATOR_NAME, range_increment, range_lower, range_upper, STATEMENT, statement_undefined, stmt_list, and TOP_LEVEL_MODULE_NAME.

Referenced by loop_normalize_of_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loop_normalize_of_statement()

list loop_normalize_of_statement ( statement  s,
hash_table  fst,
list ell,
list etl,
list swfl,
int Gcount_nlc 
)

=================================================================

list loop_normalize_of_statement(statement s, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc): Normalization of a statement.

Before walking down the statements, we forward-substitute the new-loop-counters on each type of statements. We then return a list of two statements to be put before and after statement 's'. These two new statements are generated by loops when they are treated. See document for more detail, section : "Normalisation des boucles".

est_true(t) = make_block_with_stmt( test_true(t) );

test_false(t) = make_block_with_stmt( test_false(t) );

Parameters
fstst
elllist loop_normalize_of_statement(statement s, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc): Normalization of a statement.

Before walking down the statements, we forward-substitute the new-loop-counters on each type of statements. We then return a list of two statements to be put before and after statement 's'. These two new statements are generated by loops when they are treated. See document for more detail, section : "Normalisation des boucles". forward substitute table

Parameters
etllist loop_normalize_of_statement(statement s, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc): Normalization of a statement.

Before walking down the statements, we forward-substitute the new-loop-counters on each type of statements. We then return a list of two statements to be put before and after statement 's'. These two new statements are generated by loops when they are treated. See document for more detail, section : "Normalisation des boucles". enclosing loops list

Parameters
swfllist loop_normalize_of_statement(statement s, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc): Normalization of a statement.

Before walking down the statements, we forward-substitute the new-loop-counters on each type of statements. We then return a list of two statements to be put before and after statement 's'. These two new statements are generated by loops when they are treated. See document for more detail, section : "Normalisation des boucles". enclosing tests list

Parameters
Gcount_nlclist loop_normalize_of_statement(statement s, hash_table fst, list *ell, *etl, *swfl, int *Gcount_nlc): Normalization of a statement.

Before walking down the statements, we forward-substitute the new-loop-counters on each type of statements. We then return a list of two statements to be put before and after statement 's'. These two new statements are generated by loops when they are treated. See document for more detail, section : "Normalisation des boucles". scalar written forward list

Definition at line 750 of file static_controlize.c.

757 {
759  list return_list = NIL;
760 
761  pips_assert("statement s is consistent\n", statement_consistent_p(s));
762 
763  pips_debug(3, "begin STATEMENT\n");
764  return_list = make_undefined_list();
765 
766  switch(instruction_tag(inst))
767  {
768  case is_instruction_block :
769  {
770  list tail, head;
771 
772  tail = instruction_block(inst);
773  for(head = NIL ; tail != NIL; )
774  {
775  statement stmt, before_stmt, after_stmt;
776  list insert_stmt;
777 
778  stmt = STATEMENT(CAR(tail));
779  insert_stmt = loop_normalize_of_statement(stmt, fst, ell,
780  etl, swfl, Gcount_nlc);
781  before_stmt = STATEMENT(CAR( insert_stmt ));
782  after_stmt = STATEMENT(CAR(CDR( insert_stmt )));
783 
784  if( before_stmt != statement_undefined)
785  ADD_ELEMENT_TO_LIST( head, STATEMENT, before_stmt);
787  if (after_stmt != statement_undefined )
788  ADD_ELEMENT_TO_LIST( head, STATEMENT, after_stmt );
789 
790  tail = CDR(tail);
791  }
792  instruction_block(inst) = head;
793  break;
794  }
795  case is_instruction_test :
796  {
797  test t = instruction_test(inst);
798  (void) forward_substitute_in_exp(&test_condition(t), fst);
800  /*test_true(t) = make_block_with_stmt( test_true(t) );*/
802  /* test_false(t) = make_block_with_stmt( test_false(t) );*/
805  etl, swfl, Gcount_nlc);
807  etl, swfl, Gcount_nlc);
808  gen_remove(etl, (gen_chunk*) test_condition( t ));
809  break;
810  }
811  case is_instruction_loop :
812  {
814  ADD_ELEMENT_TO_LIST(*ell, LOOP, instruction_loop( inst ));
815  return_list = loop_normalize_of_loop(instruction_loop(inst), fst, ell,
816  etl, swfl, Gcount_nlc);
817  gen_remove(ell, (gen_chunk*) instruction_loop( inst ));
818  break;
819  }
820  case is_instruction_call :
821  {
822  (void) forward_substitute_in_call(&instruction_call(inst), fst);
824  etl, swfl);
825  break;
826  }
827  case is_instruction_goto : break;
829  {
831  etl, swfl, Gcount_nlc);
832  break;
833  }
834  default : pips_internal_error("Bad instruction tag");
835  }
836  pips_debug(3, "end STATEMENT\n");
837  return( return_list );
838 }
bool statement_consistent_p(statement p)
Definition: ri.c:2195
void gen_remove(list *cpp, const void *o)
remove all occurences of item o from list *cpp, which is thus modified.
Definition: list.c:685
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define pips_internal_error
Definition: misc-local.h:149
void scalar_written_in_call(call the_call, list *ell, list *etl, list *swfl)
scalar_written_in_call((call) the_call) Detects and puts a scalar written in an assignement call,...
#define is_instruction_block
soft block->sequence transition
#define instruction_block(i)
#define LOOP(x)
LOOP.
Definition: ri.h:1606
#define instruction_loop(x)
Definition: ri.h:1520
#define test_false(x)
Definition: ri.h:2837
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
@ is_instruction_goto
Definition: ri.h:1473
@ is_instruction_unstructured
Definition: ri.h:1475
@ is_instruction_test
Definition: ri.h:1470
@ is_instruction_loop
Definition: ri.h:1471
#define test_true(x)
Definition: ri.h:2835
#define test_condition(x)
Definition: ri.h:2833
#define instruction_test(x)
Definition: ri.h:1517
#define instruction_unstructured(x)
Definition: ri.h:1532
void loop_normalize_of_unstructured(unstructured u, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
=================================================================
list loop_normalize_of_loop(loop l, hash_table fst, list *ell, list *etl, list *swfl, int *Gcount_nlc)
=================================================================
void forward_substitute_in_exp(expression *, hash_table)
Definition: utils.c:1148
void forward_substitute_in_call(call *, hash_table)
Definition: utils.c:1157
void forward_substitute_in_anyloop(void *, hash_table)
Definition: utils.c:1139
Definition: statement.c:54
A gen_chunk is used to store every object.
Definition: genC.h:58

References ADD_ELEMENT_TO_LIST, CAR, CDR, EXPRESSION, forward_substitute_in_anyloop(), forward_substitute_in_call(), forward_substitute_in_exp(), Gcount_nlc, gen_remove(), instruction_block, instruction_call, instruction_loop, instruction_tag, instruction_test, instruction_unstructured, is_instruction_block, is_instruction_call, is_instruction_goto, is_instruction_loop, is_instruction_test, is_instruction_unstructured, LOOP, loop_normalize_of_loop(), loop_normalize_of_unstructured(), make_block_with_stmt_if_not_already(), make_undefined_list(), NIL, pips_assert, pips_debug, pips_internal_error, scalar_written_in_call(), STATEMENT, statement_consistent_p(), statement_instruction, statement_undefined, test_condition, test_false, and test_true.

Referenced by loop_normalize_of_loop(), and loop_normalize_of_unstructured().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loop_normalize_of_unstructured()

void loop_normalize_of_unstructured ( unstructured  u,
hash_table  fst,
list ell,
list etl,
list swfl,
int Gcount_nlc 
)

=================================================================

void loop_normalize_of_unstructured(unstructured u, fst): Normalization of an unstructured instruction.

tmt = make_block_with_stmt( stmt );

Parameters
fstst
ellvoid loop_normalize_of_unstructured(unstructured u, fst): Normalization of an unstructured instruction. forward substitute table
etlvoid loop_normalize_of_unstructured(unstructured u, fst): Normalization of an unstructured instruction. enclosing loops list
swflvoid loop_normalize_of_unstructured(unstructured u, fst): Normalization of an unstructured instruction. enclosing tests list
Gcount_nlcvoid loop_normalize_of_unstructured(unstructured u, fst): Normalization of an unstructured instruction. scalar written forward list

Definition at line 845 of file static_controlize.c.

852 {
853  list blocs = NIL, lc;
854  list insert_stmts;
855 
856  pips_debug(2, "begin UNSTRUCTURED\n");
858  blocs = gen_nreverse( blocs ) ;
859 
860  for(lc = blocs; lc != NIL; lc = CDR(lc)) {
861  list head = NIL;
862  control ctl;
863  statement before_stmt, after_stmt, stmt;
864 
865  ctl = CONTROL(CAR( lc ));
866  stmt = control_statement( ctl );
867  insert_stmts = loop_normalize_of_statement(stmt, fst,
868  ell, etl,
869  swfl,
870  Gcount_nlc);
871  before_stmt = STATEMENT(CAR( insert_stmts ));
872  after_stmt = STATEMENT(CAR(CDR( insert_stmts )));
873 
874  if (!undefined_statement_list_p( insert_stmts )) {
875  if( before_stmt != statement_undefined)
876  ADD_ELEMENT_TO_LIST( head, STATEMENT, before_stmt );
878  if (after_stmt != statement_undefined )
879  ADD_ELEMENT_TO_LIST( head, STATEMENT, after_stmt );
880  /*stmt = make_block_with_stmt( stmt );*/
883  head = NIL;
884  }
885  }
886 
887  gen_free_list(blocs);
888  pips_debug(2, "end UNSTRUCTURED\n");
889 }
void control_map_get_blocs(control c, list *l)
Build recursively the list of all controls reachable from a control of an unstructured.
Definition: control.c:75
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
bool undefined_statement_list_p(list l)
=================================================================
#define unstructured_control
After the modification in Newgen: unstructured = entry:control x exit:control we have create a macro ...
#define CONTROL(x)
CONTROL.
Definition: ri.h:910
#define control_statement(x)
Definition: ri.h:941

References ADD_ELEMENT_TO_LIST, CAR, CDR, CONTROL, control_map_get_blocs(), control_statement, Gcount_nlc, gen_free_list(), gen_nreverse(), instruction_block, loop_normalize_of_statement(), make_block_with_stmt_if_not_already(), NIL, pips_debug, STATEMENT, statement_instruction, statement_undefined, undefined_statement_list_p(), and unstructured_control.

Referenced by loop_normalize_of_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize()

bool static_controlize ( string  mod_name)

=================================================================

void static_controlize((char*) mod_name) AL 05/93 Computes the static_control attached to module-name : mod_name.

HAS TO BE REMOVED AS SOON AS POSSIBLE: as the IOs are not treated as they would, all the instructions containing IOs are put inside comments. AP, oct 9th 1995

Normalization of all loops

Modification: loop_normalize_of_statement is used instead of

loop_normalize_of_unstructured since we cannot ensure that

mod_inst is an unstructured –11th Dec 1995, DB

oop_normalize_of_statement(mod_stat, Gforward_substitute_table, &Genclosing_loops, &Genclosing_tests, &Gscalar_written_forward, &Gcount_nlc);

The code has been modified, so the orderings are recomputed.

We compute the static control infos for each instruction.

Same remark as before –DB

Parameters
mod_nameod_name

Definition at line 495 of file static_controlize.c.

496 {
498  instruction mod_inst;
499  entity ent;
500  list formal_integers;
501  static_control sc;
502 
503  debug_on("STATIC_CONTROLIZE_DEBUG_LEVEL");
504 
505  ifdebug(2)
506  user_log("\n\n *** STATIC CONTROLIZE CODE for %s\n", mod_name);
507 
508  /*
509  * Set the current language
510  */
511  entity module = module_name_to_entity(mod_name);
512 
513 
515  if(value_code_p(mv)) {
516  code c = value_code(mv);
518  }
519 
520  Gcount_nsp = 0;
521  Gcount_nub = 0;
529 
530  ent = local_name_to_top_level_entity(mod_name);
532  formal_integers = sc_entity_to_formal_integer_parameters( ent );
533  pips_debug(7, "\n formal integers : %s \n",
534  print_structurals( formal_integers ));
535 
536  mod_stat = (statement) db_get_memory_resource(DBR_CODE, mod_name, true);
537 
538  mod_inst = statement_instruction( mod_stat );
539 
540  /* HAS TO BE REMOVED AS SOON AS POSSIBLE: as the IOs are not
541  treated as they would, all the instructions containing IOs are
542  put inside comments. AP, oct 9th 1995 */
544  /* Normalization of all loops */
545  /* Modification: loop_normalize_of_statement is used instead of */
546  /* loop_normalize_of_unstructured since we cannot ensure that */
547  /* mod_inst is an unstructured --11th Dec 1995, DB */
548 
549  /***
550  D.K desactivate the normalization of loops to preserve the
551  original code
552  */
553 
554  /*loop_normalize_of_statement(mod_stat,
555  Gforward_substitute_table,
556  &Genclosing_loops,
557  &Genclosing_tests,
558  &Gscalar_written_forward,
559  &Gcount_nlc);
560  */
561 
562 
563 
564 
565  /* The code has been modified, so the orderings are recomputed. */
567  verify_structural_parameters(formal_integers,
569 
572 
573  /* We compute the static control infos for each instruction. */
574  /* Same remark as before --DB */
575 
577  pips_assert("controlized statement mod_stat is consistent",
579  pips_assert("static_control sc is consistent",
581 
583 
585 
586  DB_PUT_MEMORY_RESOURCE(DBR_CODE, strdup(mod_name), (char*) mod_stat);
587  DB_PUT_MEMORY_RESOURCE(DBR_STATIC_CONTROL, strdup(mod_name),
588  (char*) Gstatic_control_map);
589 
590  ifdebug(2)
591  user_log("\n\n *** STATIC CONTROLIZE CODE done\n");
592 
594 
595  debug_off();
596  // Reset of the assigned_var list after the phase is complete
598  assigned_var = NIL;
599 
600  return(true);
601 }
void user_log(const char *format,...)
Definition: message.c:234
bool static_control_consistent_p(static_control p)
Definition: paf_ri.c:628
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
#define gen_recurse(start, domain_number, flt, rwt)
Definition: genC.h:283
if(!(yy_init))
Definition: genread_lex.c:1029
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
hash_table hash_table_make(hash_key_type key_type, size_t size)
Definition: hash.c:294
void hash_warn_on_redefinition(void)
these function set the variable should_i_warn_on_redefinition to the value true or false
Definition: hash.c:183
static statement mod_stat
We want to keep track of the current statement inside the recurse.
Definition: impact_check.c:41
void set_prettyprint_language_from_property(enum language_utype native)
set the prettyprint language according to the property PRETTYPRINT_LANGUAGE @description If the prope...
Definition: language.c:103
#define debug_on(env)
Definition: misc-local.h:157
#define debug_off()
Definition: misc-local.h:160
#define SET_STATEMENT_MAPPING(map, stat, val)
Definition: newgen-local.h:47
#define MAKE_STATEMENT_MAPPING()
Definition: newgen-local.h:43
@ hash_pointer
Definition: newgen_hash.h:32
#define true
Definition: newgen_types.h:81
struct cons * list
Definition: newgen_types.h:106
static char * module
Definition: pips.c:74
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
#define value_code_p(x)
Definition: ri.h:3065
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define value_code(x)
Definition: ri.h:3067
#define CODE(x)
CODE.
Definition: ri.h:751
#define code_language(x)
Definition: ri.h:792
#define language_tag(x)
Definition: ri.h:1590
char * strdup()
return(s1)
#define ifdebug(n)
Definition: sg.c:47
int Gcount_nsp
================================================================
int Gcount_nub
static list Genclosing_tests
static list Gscalar_written_forward
list assigned_var
=================================================================
statement_mapping Gstatic_control_map
static list Genclosing_loops
static bool io_filter(statement st)
======================================================================
static_control static_controlize_statement(statement s)
static hash_table Gforward_substitute_table
list Gstructure_parameters
Global Variables
string print_structurals(list)
================================================================
Definition: utils.c:732
void verify_structural_parameters(list, list *)
================================================================
Definition: utils.c:873
int stco_renumber_code(statement, int)
================================================================
Definition: utils.c:137
list sc_entity_to_formal_integer_parameters(entity)
================================================================
Definition: utils.c:900

References assigned_var, code_language, db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, entity_initial, Gcount_nsp, Gcount_nub, gen_free_list(), gen_null(), gen_recurse, Genclosing_loops, Genclosing_tests, Gforward_substitute_table, Gscalar_written_forward, Gstatic_control_map, Gstructure_parameters, hash_pointer, hash_table_make(), hash_warn_on_redefinition(), ifdebug, io_filter(), language_tag, local_name_to_top_level_entity(), MAKE_STATEMENT_MAPPING, mod_stat, module, module_name_to_entity(), module_reorder(), NIL, pips_assert, pips_debug, print_structurals(), reset_current_module_entity(), sc_entity_to_formal_integer_parameters(), set_current_module_entity(), set_prettyprint_language_from_property(), SET_STATEMENT_MAPPING, statement_consistent_p(), statement_domain, statement_instruction, static_control_consistent_p(), static_controlize_statement(), stco_renumber_code(), strdup(), user_log(), value_code, value_code_p, and verify_structural_parameters().

+ Here is the call graph for this function:

◆ static_controlize_call()

static_control static_controlize_call ( call  c)

================================================================

static_control static_controlize_call( (call) c ) AL 05/93 It computes now just a static-control assignement if it is an ASSIGN statement.

_list_of_loop_dup( Genclosing_loops ),

_list_of_loop_dup( Genclosing_loops ),

Definition at line 95 of file static_controlize.c.

96 {
97  static_control sc;
98 
99  pips_debug( 3, "begin CALL\n");
100  pips_debug( 7,
101  "call : %s\n", entity_local_name( call_function(c) ) );
102  entity e = call_function(c);
103  tag tt;
104  if ((tt = value_intrinsic_p(entity_initial(e))))
105  {
106  sc = make_static_control(false,
108  /* _list_of_loop_dup(
109  Genclosing_loops ),*/
114  }
115  else
116  {
119 
120  sc = make_static_control(b,
122  /* _list_of_loop_dup(
123  Genclosing_loops ),*/
126  }
127  pips_debug( 3, "end CALL\n");
128  return sc;
129 }
static_control make_static_control(bool a1, list a2, list a3, list a4)
Definition: paf_ri.c:655
list copy_loops(list ll)
Duplicate a loop list.
Definition: loop.c:826
int tag
TAG.
Definition: newgen_types.h:92
#define static_control_yes(x)
Definition: paf_ri.h:753
#define value_intrinsic_p(x)
Definition: ri.h:3074
#define call_arguments(x)
Definition: ri.h:711
list sc_list_of_exp_dup(list)
================================================================
Definition: utils.c:741
list sc_list_of_entity_dup(list)
================================================================
Definition: utils.c:761
bool splc_linear_access_to_arrays_p(list, list *)
================================================================
Definition: utils.c:700

References call_arguments, call_function, copy_loops(), entity_initial, entity_local_name(), Genclosing_loops, Genclosing_tests, Gstructure_parameters, make_static_control(), pips_debug, sc_list_of_entity_dup(), sc_list_of_exp_dup(), splc_linear_access_to_arrays_p(), static_control_yes, and value_intrinsic_p.

Referenced by static_controlize_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize_forloop()

static_control static_controlize_forloop ( forloop  fl)

=================================================================

static_control static_controlize_forloop( (forloop) fl ) It computes the forloop's static_control.

Parameters
fll

Definition at line 165 of file static_controlize.c.

166 {
167  static_control sc;
168 
169  pips_debug(3, "begin FORLOOP\n");
170 
171 
173  static_control_yes( sc ) = false;
174 
176 
177  pips_debug(3, "end FORLOOP\n");
178  return( sc );
179 }
#define forloop_body(x)
Definition: ri.h:1372

References forloop_body, Gstatic_control_map, pips_debug, SET_STATEMENT_MAPPING, static_control_yes, and static_controlize_statement().

Referenced by static_controlize_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize_loop()

static_control static_controlize_loop ( loop  l)

=================================================================

static_control static_controlize_loop( (loop) l ) It computes the loop's static_control.

Definition at line 135 of file static_controlize.c.

136 {
137  static_control sc;
138  expression low, up;
139 
140  pips_debug(3, "begin LOOP\n");
141 
142  low = range_lower( loop_range( l ) );
143  up = range_upper( loop_range( l ) );
146  if ( !constant_step_loop_p(l)
149  static_control_yes( sc ) = false;
150  }
153 
154  pips_debug(3, "end LOOP\n");
155  return( sc );
156 }
bool constant_step_loop_p(loop l)
Test if a loop has a constant step loop.
Definition: loop.c:733
bool splc_feautrier_expression_p(expression, list *)
================================================================
Definition: utils.c:962

References ADD_ELEMENT_TO_LIST, constant_step_loop_p(), gen_remove(), Genclosing_loops, Gstatic_control_map, LOOP, loop_body, loop_range, pips_debug, range_lower, range_upper, SET_STATEMENT_MAPPING, splc_feautrier_expression_p(), static_control_yes, and static_controlize_statement().

Referenced by static_controlize_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize_statement()

static_control static_controlize_statement ( statement  s)

We put condition under a normal disjunctive form

ontinue_statement_p(s) ||

Definition at line 209 of file static_controlize.c.

210 {
211  // Update of the list containing the variables assigned directly or indirectly by an array
213 
214  bool is_static = true, static_test = false;
216  static_control sc, sc1, sc2;
217  expression exp, exp1, exp2;
218 
219  pips_debug(3, "begin STATEMENT\n");
220  pips_debug(7, "statement_ordering = %zd \n", statement_ordering(s));
221 
222  switch(instruction_tag(inst))
223  {
224  case is_instruction_block :
225  {
226  FOREACH(STATEMENT, local_stmt, instruction_block(inst)) {
227  sc1 = static_controlize_statement( local_stmt );
228  SET_STATEMENT_MAPPING( Gstatic_control_map, local_stmt, sc1);
229  //printf("s=%p, sc=%p\n", local_stmt, sc1);
230  is_static = ( is_static && static_control_yes( sc1 ));
231  }
232  break;
233  }
234  case is_instruction_test :
235  {
236  test t = instruction_test(inst);
239 
240  /* We put condition under a normal disjunctive form */
243  //DK, don't change the structure of conditions
244  //test_condition( t ) = exp ;
245  static_test = true;
246  }
250  gen_remove( &Genclosing_tests, (void*) test_condition( t ));
251 
253  if ( (exp2 = sc_conditional(exp1, &Genclosing_loops)) ==
255  exp2 = exp1;
256  }
260  gen_remove( &Genclosing_tests, (void *) exp2 );
261  is_static = ( static_control_yes( sc1 )
262  && static_control_yes( sc2 )
263  && static_test );
264  break;
265  }
266  case is_instruction_loop :
267  {
268  loop the_loop = instruction_loop( inst );
271  sc1 = static_controlize_loop( the_loop );
272  is_static = static_control_yes( sc1 );
273  break;
274  }
276  {
277  forloop forl = instruction_forloop( inst );
280  sc1 = static_controlize_forloop( forl );
281  is_static = static_control_yes( sc1 );
282  break;
283  }
285  {
286  whileloop whilel = instruction_whileloop( inst );
289  sc1 = static_controlize_whileloop( whilel );
290  is_static = static_control_yes( sc1 );
291  break;
292  }
293  case is_instruction_call :
294  {
295  if (!(/*continue_statement_p(s) ||*/ declaration_statement_p(s)))
296  {
297  call the_call = instruction_call( inst);
299  is_static = static_control_yes(static_controlize_call( the_call ));
300  }
301  else
302  is_static = false;
303  if (!get_bool_property("STATIC_CONTROLIZE_ACROSS_USER_CALLS"))
304  {
307  is_static = false;
308  }
309  break;
310  }
311 
312  case is_instruction_goto :
313  {
314  pips_internal_error("No goto in code ressource\n");
315  is_static = false;
316  break;
317  }
319  {
320  is_static = true;
321  break;
322  }
324  {
325  unstructured local_un = instruction_unstructured( inst );
326  is_static =
328  break;
329  }
330  default :
331  {
332  pips_internal_error("Ill. instruction tag");
333  }
334  }
335  //if (!(continue_statement_p(s) || declaration_statement_p(s)))
336  sc = make_static_control(is_static,
340 
341  pips_debug(7,
342  " Returning static_control : \n bool : %s \n params : %s \n loops : %zd \n tests : %zd \n ",
343  ((is_static)?"TRUE":"FALSE"),
347  pips_debug(3, "end STATEMENT\n");
348 
349  return sc;
350 
351 }
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
size_t gen_length(const list l)
Definition: list.c:150
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
bool statement_contains_user_call_p(statement)
Definition: statement.c:3939
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
Definition: statement.c:224
bool io_intrinsic_p(entity e)
rue is a statement s is an io intrinsic
Definition: entity.c:1655
expression MakeUnaryCall(entity f, expression a)
Creates a call expression to a function with one argument.
Definition: expression.c:342
#define statement_ordering(x)
Definition: ri.h:2454
@ is_instruction_whileloop
Definition: ri.h:1472
@ is_instruction_expression
Definition: ri.h:1478
@ is_instruction_forloop
Definition: ri.h:1477
#define instruction_forloop(x)
Definition: ri.h:1538
#define instruction_whileloop(x)
Definition: ri.h:1523
#define ENTITY_NOT
static_control static_controlize_unstructured(unstructured u)
=================================================================
static_control static_controlize_whileloop(whileloop wl)
=================================================================
static_control static_controlize_forloop(forloop fl)
=================================================================
static_control static_controlize_call(call c)
================================================================
static_control static_controlize_loop(loop l)
=================================================================
bool get_reference_assignments(statement, list *)
Allows the static_controlize phase to keep and update a list containing all the variables of the prog...
Definition: utils.c:1300
expression sc_conditional(expression, list *)
================================================================
Definition: utils.c:596
bool sp_feautrier_expression_p(expression)
================================================================
Definition: utils.c:995
list sc_list_of_loop_dup(list)
================================================================
Definition: utils.c:778
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207

References ADD_ELEMENT_TO_LIST, assigned_var, call_function, copy_expression(), declaration_statement_p(), ENTITY_NOT, exp, EXPRESSION, expression_undefined, FOREACH, forward_substitute_in_anyloop(), forward_substitute_in_call(), forward_substitute_in_exp(), gen_length(), gen_remove(), Genclosing_loops, Genclosing_tests, get_bool_property(), get_reference_assignments(), Gforward_substitute_table, Gstatic_control_map, Gstructure_parameters, instruction_block, instruction_call, instruction_forloop, instruction_loop, instruction_tag, instruction_test, instruction_unstructured, instruction_whileloop, io_intrinsic_p(), 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, make_static_control(), MakeUnaryCall(), pips_debug, pips_internal_error, print_structurals(), sc_conditional(), sc_list_of_entity_dup(), sc_list_of_exp_dup(), sc_list_of_loop_dup(), SET_STATEMENT_MAPPING, sp_feautrier_expression_p(), STATEMENT, statement_contains_user_call_p(), statement_instruction, statement_ordering, static_control_yes, static_controlize_call(), static_controlize_forloop(), static_controlize_loop(), static_controlize_unstructured(), static_controlize_whileloop(), test_condition, test_false, and test_true.

Referenced by static_controlize(), static_controlize_forloop(), static_controlize_loop(), static_controlize_unstructured(), and static_controlize_whileloop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize_unstructured()

static_control static_controlize_unstructured ( unstructured  u)

=================================================================

static_control static_controlize_unstructered((unstructured) u) AL 05/93 Computes an unstructured's static_control

Definition at line 358 of file static_controlize.c.

360 {
361  bool is_static = true;
362  list blocs = NIL;
364 
365  pips_debug(3, "begin UNSTRUCTURED\n");
367  blocs = gen_nreverse( blocs ) ;
368 
369  FOREACH(CONTROL, ctl, blocs) {
372  pips_assert("stmt is consistent", statement_consistent_p(stmt));
374  //fprintf(stdout, "stmt=%p, sharing=%p\n", stmt, sc);
375  is_static = is_static && static_control_yes( sc );
376  }
377 
378  gen_free_list(blocs);
379  ret_sc = make_static_control( is_static,
383 
384  pips_debug(7,
385 "\n Returning static_control : \n bool : %s \n params : %s \n loops : %zd \n tests : %zd \n ",
386  ((is_static)?"TRUE":"FALSE"),
390 
391  pips_debug(3, "end UNSTRUCTURED\n");
392  return( ret_sc );
393 }
#define static_control_undefined
Definition: paf_ri.h:727

References CONTROL, control_map_get_blocs(), control_statement, FOREACH, gen_free_list(), gen_length(), gen_nreverse(), Genclosing_loops, Genclosing_tests, Gstatic_control_map, Gstructure_parameters, make_static_control(), NIL, pips_assert, pips_debug, print_structurals(), sc_list_of_entity_dup(), sc_list_of_exp_dup(), sc_list_of_loop_dup(), SET_STATEMENT_MAPPING, statement_consistent_p(), static_control_undefined, static_control_yes, static_controlize_statement(), and unstructured_control.

Referenced by static_controlize_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ static_controlize_whileloop()

static_control static_controlize_whileloop ( whileloop  wl)

=================================================================

static_control static_controlize_whileloop( (whileloop) l ) It computes the whileloop's static_control.

Parameters
wll

Definition at line 185 of file static_controlize.c.

186 {
187  static_control sc;
188 
189  pips_debug(3, "begin WHILELOOP\n");
190 
191 
193  static_control_yes( sc ) = false;
194 
196 
197  pips_debug(3, "end WHILELOOP\n");
198  return( sc );
199 }
#define whileloop_body(x)
Definition: ri.h:3162

References Gstatic_control_map, pips_debug, SET_STATEMENT_MAPPING, static_control_yes, static_controlize_statement(), and whileloop_body.

Referenced by static_controlize_statement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ assigned_var

list assigned_var = NIL

=================================================================

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().

◆ Genclosing_loops

◆ Genclosing_tests

◆ Gforward_substitute_table

hash_table Gforward_substitute_table
static

Definition at line 85 of file static_controlize.c.

Referenced by static_controlize(), and static_controlize_statement().

◆ Gscalar_written_forward

list Gscalar_written_forward
static

Definition at line 84 of file static_controlize.c.

Referenced by static_controlize().

◆ Gstatic_control_map

◆ Gstructure_parameters

◆ IOIntrinsicDescriptorTable

IOIntrinsicDescriptor IOIntrinsicDescriptorTable[]
static
Initial value:
= {
{"WRITE"},
{"REWIND"},
{"BACKSPACE"},
{"OPEN"},
{"CLOSE"},
{"READ"},
{"BUFFERIN"},
{"BUFFEROUT"},
{"ENDFILE"},
{"INQUIRE"},
{NULL}
}
#define IMPLIED_DO_NAME
Definition: ri-util-local.h:75

Definition at line 404 of file static_controlize.c.

Referenced by io_filter().