PIPS
fsm_split_state.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 "control.h"
#include "callgraph.h"
#include "fsm_generation.h"
+ Include dependency graph for fsm_split_state.c:

Go to the source code of this file.

Functions

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

Function Documentation

◆ fsm_split_state()

bool fsm_split_state ( const char *  module_name)

fsm_split_state.c

get the resources

Now do the job

Reorder the module, because new statements have been added

update/release resources

Parameters
module_nameodule_name

Definition at line 54 of file fsm_split_state.c.

55 {
56  /* get the resources */
57  statement stat = (statement) db_get_memory_resource(DBR_CODE,
58  module_name,
59  true);
60 
63 
64  debug_on("FSM_SPLIT_STATE_DEBUG_LEVEL");
65  /* Now do the job */
66 
67  pips_assert("Statement is consistent after FSM_SPLIT_STATE",
69 
70  /* Reorder the module, because new statements have been added */
71  module_reorder(stat);
72  DB_PUT_MEMORY_RESOURCE(DBR_CODE, module_name, stat);
73  DB_PUT_MEMORY_RESOURCE(DBR_CALLEES, module_name,
74  compute_callees(stat));
75 
76  /* update/release resources */
79 
80  debug_off();
81 
82  return true;
83 }
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: