PIPS
full_fsm_generation.c File Reference
#include <stdio.h>
#include <ctype.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "resources.h"
#include "misc.h"
#include "ri-util.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "text-util.h"
#include "dg.h"
#include "graph.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "polyedre.h"
#include "control.h"
#include "callgraph.h"
#include "fsm_generation.h"
+ Include dependency graph for full_fsm_generation.c:

Go to the source code of this file.

Typedefs

typedef dg_arc_label arc_label
 
typedef dg_vertex_label vertex_label
 

Functions

bool full_fsm_generation (const char *module_name)
 full_fsm_generation.c More...
 

Typedef Documentation

◆ arc_label

Definition at line 46 of file full_fsm_generation.c.

◆ vertex_label

Definition at line 47 of file full_fsm_generation.c.

Function Documentation

◆ full_fsm_generation()

bool full_fsm_generation ( const char *  module_name)

full_fsm_generation.c

get the resources

Now do the job

In fact, there is nothing to do because this phase is the succession of the two phases FULL_SPAGHETTIFY and FSM_GENERATION

Reorder the module, because new statements have been added

update/release resources

Parameters
module_nameodule_name

Definition at line 64 of file full_fsm_generation.c.

65 {
66  /* get the resources */
67  statement stat = (statement) db_get_memory_resource(DBR_CODE,
68  module_name,
69  true);
70 
73 
74  debug_on("FSM_GENERATION_DEBUG_LEVEL");
75 
76  /* Now do the job */
77 
78  /* In fact, there is nothing to do because this phase is the
79  * succession of the two phases FULL_SPAGHETTIFY and FSM_GENERATION
80  */
81 
82  pips_assert("Statement is consistent after FULL_FSM_GENERATION",
84 
85  /* Reorder the module, because new statements have been added */
86  module_reorder(stat);
87  DB_PUT_MEMORY_RESOURCE(DBR_CODE, module_name, stat);
88  DB_PUT_MEMORY_RESOURCE(DBR_CALLEES, module_name,
89  compute_callees(stat));
90 
91  /* update/release resources */
94 
95  debug_off();
96 
97  return true;
98 }
bool statement_consistent_p(statement p)
Definition: ri.c:2195
callees compute_callees(const statement stat)
Recompute the callees of a module statement.
Definition: callgraph.c:355
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
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
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479

References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, module_name(), module_name_to_entity(), module_reorder(), pips_assert, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), and statement_consistent_p().

+ Here is the call graph for this function: