PIPS
gen_multi_recurse_explorer.c File Reference
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "misc.h"
#include "control.h"
#include "pipsdbm.h"
#include "resources.h"
#include "prettyprint.h"
+ Include dependency graph for gen_multi_recurse_explorer.c:

Go to the source code of this file.

Functions

static bool statement_filter (statement obj)
 A simple phase to show up the path explore by gen_multi_recurse. More...
 
static void statement_rewrite (statement obj)
 
static bool call_filter (__attribute__((unused)) call obj)
 
static void call_rewrite (__attribute__((unused)) call obj)
 
static bool sequence_filter (__attribute__((unused)) sequence obj)
 
static void sequence_rewrite (__attribute__((unused)) sequence obj)
 
static bool test_filter (__attribute__((unused)) test obj)
 
static void test_rewrite (__attribute__((unused)) test obj)
 
static bool loop_filter (__attribute__((unused)) loop obj)
 
static void loop_rewrite (__attribute__((unused)) loop obj)
 
static bool forloop_filter (__attribute__((unused)) forloop obj)
 
static void forloop_rewrite (__attribute__((unused)) forloop obj)
 
static bool whileloop_filter (__attribute__((unused)) whileloop obj)
 
static void whileloop_rewrite (__attribute__((unused)) whileloop obj)
 
static bool multitest_filter (__attribute__((unused)) multitest obj)
 
static void multitest_rewrite (__attribute__((unused)) multitest obj)
 
static bool unstructured_filter (__attribute__((unused)) unstructured obj)
 
static void unstructured_rewrite (__attribute__((unused)) unstructured obj)
 
bool gen_multi_recurse_explorer (char *module_name)
 

Function Documentation

◆ call_filter()

static bool call_filter ( __attribute__((unused)) call  obj)
static

Definition at line 28 of file gen_multi_recurse_explorer.c.

28  {
29  pips_debug(0, "\t IN\n");
30  return false;
31 }
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ call_rewrite()

static void call_rewrite ( __attribute__((unused)) call  obj)
static

Definition at line 33 of file gen_multi_recurse_explorer.c.

33  {
34  pips_debug(0, "\t OUT\n");
35 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ forloop_filter()

static bool forloop_filter ( __attribute__((unused)) forloop  obj)
static

Definition at line 64 of file gen_multi_recurse_explorer.c.

64  {
65  pips_debug(0, "\t IN\n");
66  return true;
67 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ forloop_rewrite()

static void forloop_rewrite ( __attribute__((unused)) forloop  obj)
static

Definition at line 69 of file gen_multi_recurse_explorer.c.

69  {
70  pips_debug(0, "\t OUT\n");
71 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ gen_multi_recurse_explorer()

bool gen_multi_recurse_explorer ( char *  module_name)

Definition at line 109 of file gen_multi_recurse_explorer.c.

109  {
111  bool good_result_p = true;
112 
113  debug_on("GMRE_DEBUG_LEVEL");
114  pips_debug(1, "begin\n");
115 
116  //-- configure environment --//
118 
120  db_get_memory_resource(DBR_CODE, module_name, true) );
122 
123  pips_assert("Statement should be OK before...",
125 
126  //set_ordering_to_statement(module_statement);
127 
128  //-- Make the job -- //
139  , NULL
140 // , expression_domain, gen_true, gen_true
141  );
142 
143 
144  pips_assert("Statement should be OK after...",
146 
147  //-- Save modified code to database --//
149 
150  //reset_ordering_to_statement();
151 
152  pips_debug(1, "end\n");
153  debug_off();
154 
155  return (good_result_p);
156 }
bool statement_consistent_p(statement p)
Definition: ri.c:2195
static statement module_statement
Definition: alias_check.c:125
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
static void call_rewrite(__attribute__((unused)) call obj)
static bool whileloop_filter(__attribute__((unused)) whileloop obj)
static void statement_rewrite(statement obj)
static void whileloop_rewrite(__attribute__((unused)) whileloop obj)
static bool statement_filter(statement obj)
A simple phase to show up the path explore by gen_multi_recurse.
static void forloop_rewrite(__attribute__((unused)) forloop obj)
static bool forloop_filter(__attribute__((unused)) forloop obj)
static bool sequence_filter(__attribute__((unused)) sequence obj)
static bool loop_filter(__attribute__((unused)) loop obj)
static void multitest_rewrite(__attribute__((unused)) multitest obj)
static void test_rewrite(__attribute__((unused)) test obj)
static bool call_filter(__attribute__((unused)) call obj)
static void sequence_rewrite(__attribute__((unused)) sequence obj)
static void unstructured_rewrite(__attribute__((unused)) unstructured obj)
static bool unstructured_filter(__attribute__((unused)) unstructured obj)
static void loop_rewrite(__attribute__((unused)) loop obj)
static bool test_filter(__attribute__((unused)) test obj)
static bool multitest_filter(__attribute__((unused)) multitest obj)
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
Definition: genClib.c:3428
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
#define debug_on(env)
Definition: misc-local.h:157
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define debug_off()
Definition: misc-local.h:160
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
#define forloop_domain
newgen_extensions_domain_defined
Definition: ri.h:178
#define test_domain
newgen_entity_domain_defined
Definition: ri.h:418
#define unstructured_domain
newgen_type_domain_defined
Definition: ri.h:442
#define loop_domain
newgen_language_domain_defined
Definition: ri.h:218
#define statement_domain
newgen_sizeofexpression_domain_defined
Definition: ri.h:362
#define call_domain
newgen_callees_domain_defined
Definition: ri.h:58
#define multitest_domain
newgen_mode_domain_defined
Definition: ri.h:234
#define whileloop_domain
newgen_variable_domain_defined
Definition: ri.h:466
#define sequence_domain
newgen_reference_domain_defined
Definition: ri.h:346
char * strdup()

References call_domain, call_filter(), call_rewrite(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, forloop_domain, forloop_filter(), forloop_rewrite(), gen_multi_recurse(), get_current_module_statement(), loop_domain, loop_filter(), loop_rewrite(), module_name(), module_name_to_entity(), module_statement, multitest_domain, multitest_filter(), multitest_rewrite(), pips_assert, pips_debug, sequence_domain, sequence_filter(), sequence_rewrite(), set_current_module_entity(), set_current_module_statement(), statement_consistent_p(), statement_domain, statement_filter(), statement_rewrite(), strdup(), test_domain, test_filter(), test_rewrite(), unstructured_domain, unstructured_filter(), unstructured_rewrite(), whileloop_domain, whileloop_filter(), and whileloop_rewrite().

+ Here is the call graph for this function:

◆ loop_filter()

static bool loop_filter ( __attribute__((unused)) loop  obj)
static

Definition at line 55 of file gen_multi_recurse_explorer.c.

55  {
56  pips_debug(0, "\t IN\n");
57  return true;
58 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ loop_rewrite()

static void loop_rewrite ( __attribute__((unused)) loop  obj)
static

Definition at line 60 of file gen_multi_recurse_explorer.c.

60  {
61  pips_debug(0, "\t OUT\n");
62 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ multitest_filter()

static bool multitest_filter ( __attribute__((unused)) multitest  obj)
static

Definition at line 82 of file gen_multi_recurse_explorer.c.

82  {
83  pips_debug(0, "\t IN\n");
84  return true;
85 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ multitest_rewrite()

static void multitest_rewrite ( __attribute__((unused)) multitest  obj)
static

Definition at line 87 of file gen_multi_recurse_explorer.c.

87  {
88  pips_debug(0, "\t OUT\n");
89 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ sequence_filter()

static bool sequence_filter ( __attribute__((unused)) sequence  obj)
static

Definition at line 37 of file gen_multi_recurse_explorer.c.

37  {
38  pips_debug(0, "\t IN\n");
39  return true;
40 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ sequence_rewrite()

static void sequence_rewrite ( __attribute__((unused)) sequence  obj)
static

Definition at line 42 of file gen_multi_recurse_explorer.c.

42  {
43  pips_debug(0, "\t OUT\n");
44 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ statement_filter()

static bool statement_filter ( statement  obj)
static

A simple phase to show up the path explore by gen_multi_recurse.

Definition at line 13 of file gen_multi_recurse_explorer.c.

13  {
14  pips_debug(0, "\t IN\n");
15  ifdebug(0) {
16  print_statement(obj);
17  }
18  return true;
19 }
void print_statement(statement)
Print a statement on stderr.
Definition: statement.c:98
#define ifdebug(n)
Definition: sg.c:47

References ifdebug, pips_debug, and print_statement().

Referenced by gen_multi_recurse_explorer().

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

◆ statement_rewrite()

static void statement_rewrite ( statement  obj)
static

Definition at line 21 of file gen_multi_recurse_explorer.c.

21  {
22  pips_debug(0, "\t OUT\n");
23  ifdebug(2) {
24  print_statement(obj);
25  }
26 }

References ifdebug, pips_debug, and print_statement().

Referenced by gen_multi_recurse_explorer().

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

◆ test_filter()

static bool test_filter ( __attribute__((unused)) test  obj)
static

Definition at line 46 of file gen_multi_recurse_explorer.c.

46  {
47  pips_debug(0, "\t IN\n");
48  return true;
49 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ test_rewrite()

static void test_rewrite ( __attribute__((unused)) test  obj)
static

Definition at line 51 of file gen_multi_recurse_explorer.c.

51  {
52  pips_debug(0, "\t OUT\n");
53 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ unstructured_filter()

static bool unstructured_filter ( __attribute__((unused)) unstructured  obj)
static

Definition at line 91 of file gen_multi_recurse_explorer.c.

91  {
92  pips_debug(0, "\t IN\n");
93  return true;
94 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ unstructured_rewrite()

static void unstructured_rewrite ( __attribute__((unused)) unstructured  obj)
static

Definition at line 96 of file gen_multi_recurse_explorer.c.

96  {
97  pips_debug(0, "\t OUT\n");
98 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ whileloop_filter()

static bool whileloop_filter ( __attribute__((unused)) whileloop  obj)
static

Definition at line 73 of file gen_multi_recurse_explorer.c.

73  {
74  pips_debug(0, "\t IN\n");
75  return true;
76 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function:

◆ whileloop_rewrite()

static void whileloop_rewrite ( __attribute__((unused)) whileloop  obj)
static

Definition at line 78 of file gen_multi_recurse_explorer.c.

78  {
79  pips_debug(0, "\t OUT\n");
80 }

References pips_debug.

Referenced by gen_multi_recurse_explorer().

+ Here is the caller graph for this function: