PIPS
|
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "boolean.h"
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "effects.h"
#include "database.h"
#include "misc.h"
#include "text.h"
#include "text-util.h"
#include "ri-util.h"
#include "accel-util.h"
#include "effects-util.h"
#include "effects-generic.h"
#include "effects-simple.h"
#include "pipsdbm.h"
#include "resources.h"
#include "control.h"
#include "conversion.h"
#include "properties.h"
#include "transformations.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "matrix.h"
#include "graph.h"
#include "paf_ri.h"
#include "constants.h"
#include "paf-util.h"
#include "static_controlize.h"
#include "pocc-interface.h"
Go to the source code of this file.
Typedefs | |
typedef void * | arc_label |
tatic_control More... | |
typedef void * | vertex_label |
Functions | |
static bool | are_stmts_eq (statement stmt1, statement stmt2) |
bool | condition_body_contains_loop_p (statement s) |
Look for a loop in a statement. More... | |
bool | condition_contains_loop_p (statement s) |
Checks if a test contains a loop. More... | |
bool | is_SCOP_rich (sequence seq, statement last_added_pragma, statement curStmt, bool *pragma_added_p) |
Checks if there is at least one loop in the sequence. More... | |
static void | insert_endscop_before_stmt (statement stmt, bool *pragma_added_p, sequence seqInst, list stmts, statement last_added_pragma) |
Check if the SCoP is rich, add pragma "endscop" before stmt and change the value of pragma_added_p. More... | |
static void | insert_endscop_after_stmt (statement stmt, bool *pragma_added_p, sequence seqInst, statement last_added_pragma) |
Check if the SCoP is rich, add pragma "endscop" after stmt and change the value of pragma_added_p. More... | |
static void | insert_endscop_in_sequence (statement stmt, bool *pragma_added_p, bool insertBefore) |
nsert a pragma "endscop" before/after the statement stmt Insert a ";" statement in sequence with stmt thereby converting stmt to a sequence More... | |
static void | add_to_stmt (statement stmt, bool *pragma_added_p) |
Add a "scop" pragma to the statement stmt. More... | |
bool | is_subroutine (instruction inst) |
Returns true if the instruction is a subroutine. More... | |
static void | pragma_scop (statement s, bool pragma_added_p, bool in_loop_p) |
Called recursively, place pragmas on statements according to SCoP conditions. More... | |
bool | pocc_prettyprinter (char *module_name) |
use the result of control static to add pragmas for pocc compiler , that pragmas delimit control static parts (static control region which can contains many loop nests More... | |
Variables | |
static statement_mapping | Gsc_map |
typedef void* arc_label |
tatic_control
Pips includes
Types arc_label and vertex_label must be defined although they are not used
Definition at line 49 of file pocc_prettyprinter.c.
typedef void* vertex_label |
Definition at line 50 of file pocc_prettyprinter.c.
Add a "scop" pragma to the statement stmt.
Set pragma_added_p to true
Definition at line 167 of file pocc_prettyprinter.c.
References add_pragma_str_to_statement().
Referenced by pragma_scop().
Definition at line 68 of file pocc_prettyprinter.c.
References statement_number.
Referenced by is_SCOP_rich().
Look for a loop in a statement.
Warning! Do not modify this file that is automatically generated!
Definition at line 73 of file pocc_prettyprinter.c.
References condition_contains_loop_p(), FOREACH, instruction_sequence, sequence_statements, statement_forloop_p(), statement_instruction, statement_loop_p(), statement_sequence_p(), and statement_test_p().
Referenced by condition_contains_loop_p().
Checks if a test contains a loop.
Definition at line 91 of file pocc_prettyprinter.c.
References condition_body_contains_loop_p(), instruction_test, statement_instruction, statement_test_p(), test_false, and test_true.
Referenced by condition_body_contains_loop_p(), and is_SCOP_rich().
|
static |
Check if the SCoP is rich, add pragma "endscop" after stmt and change the value of pragma_added_p.
Definition at line 147 of file pocc_prettyprinter.c.
References add_pragma_str_to_statement(), entity_empty_label(), gen_insert_after(), is_SCOP_rich(), make_continue_statement(), and sequence_statements.
Referenced by pragma_scop().
|
static |
Check if the SCoP is rich, add pragma "endscop" before stmt and change the value of pragma_added_p.
Definition at line 137 of file pocc_prettyprinter.c.
References add_pragma_str_to_statement(), entity_empty_label(), gen_insert_before(), is_SCOP_rich(), make_continue_statement(), and sequence_statements.
Referenced by pragma_scop().
|
static |
nsert a pragma "endscop" before/after the statement stmt Insert a ";" statement in sequence with stmt thereby converting stmt to a sequence
Definition at line 158 of file pocc_prettyprinter.c.
References add_pragma_str_to_statement(), entity_empty_label(), insert_statement(), and make_continue_statement().
Referenced by pragma_scop().
bool is_SCOP_rich | ( | sequence | seq, |
statement | last_added_pragma, | ||
statement | curStmt, | ||
bool * | pragma_added_p | ||
) |
Checks if there is at least one loop in the sequence.
If not it removes the previously added pragma on the last_added_pragma statement.
seq | eq |
last_added_pragma | ast_added_pragma |
curStmt | urStmt |
pragma_added_p | ragma_added_p |
Definition at line 107 of file pocc_prettyprinter.c.
References are_stmts_eq(), clear_pragma_on_statement(), condition_contains_loop_p(), FOREACH, sequence_statements, statement_forloop_p(), statement_loop_p(), statement_test_p(), and statement_with_pragma_p().
Referenced by insert_endscop_after_stmt(), and insert_endscop_before_stmt().
bool is_subroutine | ( | instruction | inst | ) |
Returns true if the instruction is a subroutine.
inst | nst |
Definition at line 173 of file pocc_prettyprinter.c.
References call_function, entity_type, functional_result, instruction_call, instruction_call_p, type_functional, type_functional_p, and type_void_p.
Referenced by pragma_scop().
bool pocc_prettyprinter | ( | char * | module_name | ) |
use the result of control static to add pragmas for pocc compiler , that pragmas delimit control static parts (static control region which can contains many loop nests
module_name | odule_name |
Definition at line 372 of file pocc_prettyprinter.c.
References db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, get_current_module_statement(), Gsc_map, local_name_to_top_level_entity(), module_name(), pragma_scop(), reset_current_module_entity(), reset_current_module_statement(), set_current_module_entity(), and set_current_module_statement().
Called recursively, place pragmas on statements according to SCoP conditions.
Definition at line 188 of file pocc_prettyprinter.c.
References add_to_stmt(), declaration_statement_p(), FOREACH, forloop_body, get_bool_property(), GET_STATEMENT_MAPPING, Gsc_map, insert_endscop_after_stmt(), insert_endscop_before_stmt(), insert_endscop_in_sequence(), instruction_call, instruction_forloop, instruction_loop, instruction_sequence, instruction_tag, instruction_test, instruction_whileloop, is_instruction_call, is_instruction_forloop, is_instruction_loop, is_instruction_sequence, is_instruction_test, is_instruction_whileloop, is_subroutine(), loop_body, return_statement_p(), sequence_statements, statement_instruction, statement_undefined, static_control_yes, test_false, test_true, user_call_p(), and whileloop_body.
Referenced by pocc_prettyprinter().
|
static |
Definition at line 66 of file pocc_prettyprinter.c.
Referenced by pocc_prettyprinter(), and pragma_scop().