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 "effects-util.h"
#include "text-util.h"
#include "dg.h"
#include "phrase_tools.h"
#include "spaghettify.h"
Go to the source code of this file.
Functions | |
static control | make_condition_from_whileloop (whileloop the_whileloop, statement stat) |
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... | |
static control | make_exit_from_whileloop () |
Build and return a new control containing exit statement of the unstructured whileloop (this is a continue statement) More... | |
static control | make_body_from_whileloop (whileloop the_whileloop, const char *module_name) |
Build and return a new control containing body statement of the unstructured whileloop. More... | |
static unstructured | make_unstructured_from_whileloop (whileloop the_whileloop, statement stat, const char *module_name) |
Build and return a new unstructured coding the "destructured" whileloop. More... | |
statement | spaghettify_whileloop (statement stat, const char *module_name) |
whileloop_spaghettify.c More... | |
|
static |
Build and return a new control containing body statement of the unstructured whileloop.
Definition at line 110 of file whileloop_spaghettify.c.
References make_control(), module_name(), NIL, spaghettify_statement(), and whileloop_body.
Referenced by make_unstructured_from_whileloop().
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 file contains the code used for spaghettify whileloops.
General syntax of whileloop in Fortran are:
DO WHILE CONDITION STATEMENT END DO
Following code is generated:
10 IF (CONDITION) THEN STATEMENT GOTO 10 20 CONTINUE Build and return a new control containing condition statement of the unstructured whileloop
Definition at line 76 of file whileloop_spaghettify.c.
References empty_comments, entity_empty_label(), is_instruction_test, make_continue_statement(), make_control(), make_instruction(), make_statement(), make_synchronization_none(), make_test(), NIL, statement_extensions, statement_number, statement_ordering, and whileloop_condition.
Referenced by make_unstructured_from_whileloop().
|
static |
Build and return a new control containing exit statement of the unstructured whileloop (this is a continue statement)
Definition at line 101 of file whileloop_spaghettify.c.
References entity_empty_label(), make_continue_statement(), make_control(), and NIL.
Referenced by make_unstructured_from_whileloop().
|
static |
Build and return a new unstructured coding the "destructured" whileloop.
The first connexion is the false one
Definition at line 122 of file whileloop_spaghettify.c.
References exit, link_3_control_nodes(), make_body_from_whileloop(), make_condition_from_whileloop(), make_exit_from_whileloop(), make_unstructured(), and module_name().
Referenced by spaghettify_whileloop().
stat | tat |
module_name | odule_name |
Definition at line 142 of file whileloop_spaghettify.c.
References instruction_tag, instruction_whileloop, is_instruction_unstructured, is_instruction_whileloop, make_instruction(), make_unstructured_from_whileloop(), module_name(), pips_assert, pips_debug, and statement_instruction.
Referenced by full_spaghettify_statement(), and spaghettify_statement().