PIPS
varwidth.c File Reference
#include "stdlib.h"
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "ri-util.h"
#include "effects-util.h"
#include "sac.h"
+ Include dependency graph for varwidth.c:

Go to the source code of this file.

Functions

static bool variables_width_filter (reference r, int *g_varwidth)
 
int effective_variables_width (instruction i)
 varwidth.c More...
 

Function Documentation

◆ effective_variables_width()

int effective_variables_width ( instruction  i)

varwidth.c

Definition at line 85 of file varwidth.c.

86 {
87  int g_varwidth = 0;
88 
90 
91  return g_varwidth;
92 }
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
Definition: genC.h:285
void gen_null2(__attribute__((unused)) void *u1, __attribute__((unused)) void *u2)
idem with 2 args, to please overpeaky compiler checks
Definition: genClib.c:2758
#define reference_domain
newgen_range_domain_defined
Definition: ri.h:338
static bool variables_width_filter(reference r, int *g_varwidth)
Definition: varwidth.c:43

References gen_context_recurse, gen_null2(), reference_domain, and variables_width_filter().

Referenced by compute_parallelism_factor(), and compute_variable_size().

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

◆ variables_width_filter()

static bool variables_width_filter ( reference  r,
int g_varwidth 
)
static

do NOT forget to multiply the size by 8, to get it in bits instead of bytes....

ase is_basic_logical: width = 8*basic_logical(b); break;

don't know what to do with this... keep searching

do not search recursively

keep searching recursievly

Definition at line 43 of file varwidth.c.

44 {
46  if (type_variable_p(ut))
47  {
49 
50  /* do NOT forget to multiply the size by 8, to get it in
51  * bits instead of bytes....
52  */
53  int width;
54  switch(basic_tag(b))
55  {
56  case is_basic_int:
57  width = SizeOfElements(b);
58  break;
59 
60  case is_basic_float:
61  width = SizeOfElements(b);
62  break;
63 
64  /*case is_basic_logical:
65  width = 8*basic_logical(b);
66  break;*/
67 
68  case is_basic_pointer:
69  default:
70  free(b);
71  return true; /* don't know what to do with this... keep searching */
72  }
73  free(b);
74  width*=8;
75 
76  if (width > *g_varwidth)
77  *g_varwidth = width;
78 
79  return false; /* do not search recursively */
80  }
81  else
82  return true; /* keep searching recursievly*/
83 }
void free(void *)
type ultimate_type(type)
Definition: type.c:3466
_int SizeOfElements(basic)
This function returns the length in bytes of the Fortran or C type represented by a basic,...
Definition: size.c:297
basic basic_of_reference(reference)
Retrieves the basic of a reference in a newly allocated basic object.
Definition: type.c:1459
@ is_basic_float
Definition: ri.h:572
@ is_basic_pointer
Definition: ri.h:578
@ is_basic_int
Definition: ri.h:571
#define reference_variable(x)
Definition: ri.h:2326
#define basic_tag(x)
Definition: ri.h:613
#define entity_type(x)
Definition: ri.h:2792
#define type_variable_p(x)
Definition: ri.h:2947

References basic_of_reference(), basic_tag, entity_type, free(), is_basic_float, is_basic_int, is_basic_pointer, reference_variable, SizeOfElements(), type_variable_p, and ultimate_type().

Referenced by effective_variables_width().

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