PIPS
same_names.c File Reference
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "linear.h"
#include "genC.h"
#include "misc.h"
#include "ri.h"
#include "text.h"
#include "ri-util.h"
+ Include dependency graph for same_names.c:

Go to the source code of this file.

Functions

bool same_expression_name_p (expression, expression)
 compare two entities for their appearance point of view. More...
 
bool same_lexpr_name_p (list l1, list l2)
 same_names.c More...
 
bool same_entity_lname_p (entity e1, entity e2)
 
bool same_call_name_p (call c1, call c2)
 
bool same_ref_name_p (reference r1, reference r2)
 
bool same_range_name_p (range r1, range r2)
 
bool same_sizeofexpression_name_p (sizeofexpression s0, sizeofexpression s1)
 
bool same_subscript_name_p (subscript ss1, subscript ss2)
 
bool same_cast_name_p (cast cs1, cast cs2)
 
bool same_application_name_p (application a1, application a2)
 
bool same_va_arg_name_p (list l1, list l2)
 
bool same_syntax_name_p (syntax s1, syntax s2)
 

Function Documentation

◆ same_application_name_p()

bool same_application_name_p ( application  a1,
application  a2 
)
Parameters
a11
a22

Definition at line 109 of file same_names.c.

110 {
113 }
#define application_arguments(x)
Definition: ri.h:510
#define application_function(x)
Definition: ri.h:508
bool same_expression_name_p(expression, expression)
compare two entities for their appearance point of view.
Definition: same_names.c:159
bool same_lexpr_name_p(list l1, list l2)
same_names.c
Definition: same_names.c:53

References application_arguments, application_function, same_expression_name_p(), and same_lexpr_name_p().

Referenced by same_syntax_name_p().

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

◆ same_call_name_p()

bool same_call_name_p ( call  c1,
call  c2 
)
Parameters
c11
c22

Definition at line 69 of file same_names.c.

70 {
73 }
#define call_function(x)
Definition: ri.h:709
#define call_arguments(x)
Definition: ri.h:711
bool same_entity_lname_p(entity e1, entity e2)
Definition: same_names.c:64

References call_arguments, call_function, same_entity_lname_p(), and same_lexpr_name_p().

Referenced by same_syntax_name_p().

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

◆ same_cast_name_p()

bool same_cast_name_p ( cast  cs1,
cast  cs2 
)
Parameters
cs1s1
cs2s2

Definition at line 103 of file same_names.c.

104 {
105  return same_type_name_p(cast_type(cs1), cast_type(cs2)) &&
107 }
bool same_type_name_p(const type, const type)
For naming homogeneity: expression_to_string(), reference_to_string()...
Definition: type.c:74
#define cast_expression(x)
Definition: ri.h:747
#define cast_type(x)
Definition: ri.h:745

References cast_expression, cast_type, same_expression_name_p(), and same_type_name_p().

Referenced by same_syntax_name_p().

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

◆ same_entity_lname_p()

bool same_entity_lname_p ( entity  e1,
entity  e2 
)
Parameters
e11
e22

Definition at line 64 of file same_names.c.

65 {
67 }
#define same_string_p(s1, s2)
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

References entity_local_name(), and same_string_p.

Referenced by inline_should_inline(), outline_remove_duplicates(), same_call_name_p(), same_ref_name_p(), simd_replace_parameters(), and UseFormalArguments().

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

◆ same_expression_name_p()

bool same_expression_name_p ( expression  e1,
expression  e2 
)

compare two entities for their appearance point of view.

used for putting common in includes.

Parameters
e11
e22

Definition at line 159 of file same_names.c.

160 {
162 }
#define expression_syntax(x)
Definition: ri.h:1247
bool same_syntax_name_p(syntax s1, syntax s2)
Definition: same_names.c:130

References expression_syntax, and same_syntax_name_p().

Referenced by same_application_name_p(), same_cast_name_p(), same_lexpr_name_p(), same_range_name_p(), same_sizeofexpression_name_p(), and same_subscript_name_p().

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

◆ same_lexpr_name_p()

bool same_lexpr_name_p ( list  l1,
list  l2 
)

same_names.c

else

Parameters
l11
l22

Definition at line 53 of file same_names.c.

54 {
55  if (gen_length(l1)!=gen_length(l2))
56  return false;
57  /* else */
58  for(; l1 && l2; POP(l1), POP(l2))
60  return false;
61  return true;
62 }
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
size_t gen_length(const list l)
Definition: list.c:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217

References CAR, EXPRESSION, gen_length(), POP, and same_expression_name_p().

Referenced by same_application_name_p(), same_call_name_p(), same_ref_name_p(), and same_subscript_name_p().

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

◆ same_range_name_p()

bool same_range_name_p ( range  r1,
range  r2 
)
Parameters
r11
r22

Definition at line 81 of file same_names.c.

82 {
86 }
#define range_upper(x)
Definition: ri.h:2290
#define range_increment(x)
Definition: ri.h:2292
#define range_lower(x)
Definition: ri.h:2288

References range_increment, range_lower, range_upper, and same_expression_name_p().

Referenced by same_syntax_name_p().

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

◆ same_ref_name_p()

bool same_ref_name_p ( reference  r1,
reference  r2 
)
Parameters
r11
r22

Definition at line 75 of file same_names.c.

76 {
79 }
#define reference_variable(x)
Definition: ri.h:2326
#define reference_indices(x)
Definition: ri.h:2328

References reference_indices, reference_variable, same_entity_lname_p(), and same_lexpr_name_p().

Referenced by get_complement_expression(), and same_syntax_name_p().

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

◆ same_sizeofexpression_name_p()

bool same_sizeofexpression_name_p ( sizeofexpression  s0,
sizeofexpression  s1 
)
Parameters
s00
s11

Definition at line 88 of file same_names.c.

89 {
94  return false;
95 }
#define sizeofexpression_type(x)
Definition: ri.h:2406
#define sizeofexpression_expression(x)
Definition: ri.h:2409
#define sizeofexpression_expression_p(x)
Definition: ri.h:2407
#define sizeofexpression_type_p(x)
Definition: ri.h:2404
s1
Definition: set.c:247

References s1, same_expression_name_p(), same_type_name_p(), sizeofexpression_expression, sizeofexpression_expression_p, sizeofexpression_type, and sizeofexpression_type_p.

Referenced by same_syntax_name_p(), and same_va_arg_name_p().

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

◆ same_subscript_name_p()

bool same_subscript_name_p ( subscript  ss1,
subscript  ss2 
)
Parameters
ss1s1
ss2s2

Definition at line 97 of file same_names.c.

98 {
101 }
#define subscript_indices(x)
Definition: ri.h:2563
#define subscript_array(x)
Definition: ri.h:2561

References same_expression_name_p(), same_lexpr_name_p(), subscript_array, and subscript_indices.

Referenced by same_syntax_name_p().

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

◆ same_syntax_name_p()

bool same_syntax_name_p ( syntax  s1,
syntax  s2 
)

else

Parameters
s11
s22

Definition at line 130 of file same_names.c.

131 {
132  if (syntax_tag(s1)!=syntax_tag(s2))
133  return false;
134  /* else */
135  switch (syntax_tag(s1))
136  {
137  case is_syntax_call:
139  case is_syntax_reference:
141  case is_syntax_range:
145  case is_syntax_subscript:
147  case is_syntax_cast:
151  case is_syntax_va_arg:
153  default:
154  pips_internal_error("unexpected syntax tag: %d", syntax_tag(s1));
155  }
156  return false;
157 }
#define pips_internal_error
Definition: misc-local.h:149
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_tag(x)
Definition: ri.h:2727
#define syntax_cast(x)
Definition: ri.h:2739
#define syntax_application(x)
Definition: ri.h:2748
#define syntax_va_arg(x)
Definition: ri.h:2751
#define syntax_range(x)
Definition: ri.h:2733
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_application
Definition: ri.h:2697
@ is_syntax_cast
Definition: ri.h:2694
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_va_arg
Definition: ri.h:2698
@ is_syntax_reference
Definition: ri.h:2691
@ is_syntax_sizeofexpression
Definition: ri.h:2695
@ is_syntax_subscript
Definition: ri.h:2696
#define syntax_sizeofexpression(x)
Definition: ri.h:2742
#define syntax_call(x)
Definition: ri.h:2736
#define syntax_subscript(x)
Definition: ri.h:2745
bool same_sizeofexpression_name_p(sizeofexpression s0, sizeofexpression s1)
Definition: same_names.c:88
bool same_call_name_p(call c1, call c2)
Definition: same_names.c:69
bool same_ref_name_p(reference r1, reference r2)
Definition: same_names.c:75
bool same_subscript_name_p(subscript ss1, subscript ss2)
Definition: same_names.c:97
bool same_application_name_p(application a1, application a2)
Definition: same_names.c:109
bool same_va_arg_name_p(list l1, list l2)
Definition: same_names.c:115
bool same_cast_name_p(cast cs1, cast cs2)
Definition: same_names.c:103
bool same_range_name_p(range r1, range r2)
Definition: same_names.c:81

References 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, pips_internal_error, s1, same_application_name_p(), same_call_name_p(), same_cast_name_p(), same_range_name_p(), same_ref_name_p(), same_sizeofexpression_name_p(), same_subscript_name_p(), same_va_arg_name_p(), syntax_application, syntax_call, syntax_cast, syntax_range, syntax_reference, syntax_sizeofexpression, syntax_subscript, syntax_tag, and syntax_va_arg.

Referenced by same_expression_name_p().

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

◆ same_va_arg_name_p()

bool same_va_arg_name_p ( list  l1,
list  l2 
)
Parameters
l11
l22

Definition at line 115 of file same_names.c.

116 {
117  if (gen_length(l1)!=gen_length(l2))
118  return false;
119 
120  for(; l1 && l2; POP(l1), POP(l2)) {
124  return false;
125  }
126  return true;
127 }
#define SIZEOFEXPRESSION(x)
SIZEOFEXPRESSION.
Definition: ri.h:2364

References CAR, gen_length(), POP, s1, same_sizeofexpression_name_p(), and SIZEOFEXPRESSION.

Referenced by same_syntax_name_p().

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