PIPS
global_parallelization.c
Go to the documentation of this file.
1 /*
2 
3  $Id: global_parallelization.c 23495 2018-10-24 09:19:47Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 /* interfaces with pipsmake for hyperplane transformation
28  */
29 
30 #include <stdio.h>
31 #include <string.h>
32 
33 #include "genC.h"
34 #include "misc.h"
35 #include "constants.h"
36 #include "linear.h"
37 #include "ri.h"
38 #include "ri-util.h"
39 #include "database.h"
40 #include "pipsdbm.h"
41 #include "resources.h"
42 #include "control.h"
43 #include "conversion.h"
44 
45 #include "transformations.h"
46 
47 #include "hyperplane.h"
48 
49 static bool always_select() { return true;}
50 
52 {
54  statement s;
55 
56  pips_assert("global_parallelization", entity_module_p(module));
57  s = (statement) db_get_memory_resource(DBR_CODE, module_name, false);
58 
59  debug_on("HYPERPLANE_DEBUG_LEVEL");
60 
62 
63  debug_off();
64 
65  module_reorder(s);
66 
67  DB_PUT_MEMORY_RESOURCE(DBR_CODE,
69  (char*) s);
70 }
71 
72 bool loop_hyperplane(const char* module_name)
73 {
74  bool return_status = false;
75 
77 
78  return return_status;
79 }
struct _newgen_struct_statement_ * statement
Definition: cloning.h:21
void look_for_nested_loop_statements(statement, statement(*)(list, bool(*)(statement)), bool(*)(statement))
look_for_nested_loops.c
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
bool loop_hyperplane(const char *module_name)
static bool always_select()
interfaces with pipsmake for hyperplane transformation
void global_parallelization(const char *module_name)
global_parallelization.c
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
statement hyperplane(list lls, _UNUSED_ bool(*u)(statement))
package hyperplane
Definition: hyperplane.c:61
bool interactive_loop_transformation(const char *module_name, statement(*loop_transformation)(list, bool(*)(statement)))
#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
static char * module
Definition: pips.c:74
bool module_reorder(statement body)
Reorder a module and recompute order to statement if any.
Definition: reorder.c:244
entity local_name_to_top_level_entity(const char *n)
This function try to find a top-level entity from a local name.
Definition: entity.c:1450
bool entity_module_p(entity e)
Definition: entity.c:683
char * strdup()