PIPS
|
#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 "prettyprint.h"
#include "effects-util.h"
#include "pipsdbm.h"
#include "text-util.h"
#include "dg.h"
#include "properties.h"
#include "control.h"
#include "callgraph.h"
#include "spaghettify.h"
#include "phrase_tools.h"
Go to the source code of this file.
Functions | |
statement | spaghettify_statement (statement stat, const char *module_name) |
The spaghettifier is used in context of PHRASE project while creating "Finite State Machine"-like code portions in order to synthetise them in reconfigurables units. More... | |
bool | spaghettify (const char *module_name) |
bool spaghettify | ( | const char * | module_name | ) |
get the resources
Now do the job
Reorder the module, because new statements have been added
update/release resources
module_name | odule_name |
Definition at line 173 of file spaghettify.c.
References compute_callees(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, debug_off, debug_on, local_name_to_top_level_entity(), module_name(), module_reorder(), pips_assert, reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), set_current_module_statement(), spaghettify_statement(), and statement_consistent_p().
The spaghettifier is used in context of PHRASE project while creating "Finite State Machine"-like code portions in order to synthetise them in reconfigurables units.
This phase transforms structured code portions (eg. loops) in unstructured statements.
To add flexibility, the behavior of \texttt{spaghettifier} is controlled by the properties
spaghettify > MODULE.code < PROGRAM.entities < MODULE.code This function is recursively called during spaghettization. It takes the statement stat as parameter and return a new spaghettized statement (or the same if nothing has been done). Spaguettization is done:
stat | tat |
module_name | odule_name |
Definition at line 85 of file spaghettify.c.
References gen_list_patch(), get_bool_property(), ifdebug, instruction_sequence, instruction_tag, is_instruction_call, is_instruction_forloop, is_instruction_goto, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_unstructured, is_instruction_whileloop, MAP, module_name(), pips_debug, print_statement(), sequence_statements, spaghettify_forloop(), spaghettify_loop(), spaghettify_statement(), spaghettify_test(), spaghettify_whileloop(), STATEMENT, statement_comments, statement_domain_number, statement_instruction, statement_number, statement_ordering, statement_type_as_string(), and statement_with_empty_comment_p().
Referenced by make_body_from_forloop(), make_body_from_loop(), make_body_from_whileloop(), make_if_false_from_test(), make_if_true_from_test(), spaghettify(), and spaghettify_statement().