PIPS
effects-convex-local.h
Go to the documentation of this file.
1
/*
2
3
$Id: effects-convex-local.h 23065 2016-03-02 09:05:50Z 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
25
/* simulation of the type region */
26
27
#define region effect
28
#define REGION EFFECT
/* for casts */
29
#define region_CAST REGION_CAST
30
#define REGION_CAST(x) REGION(x)
31
#define REGION_ EFFECT_
/* for some left casts */
32
#define REGION_TYPE EFFECT_TYPE
33
#define REGION_NEWGEN_DOMAIN EFFECT_NEWGEN_DOMAIN
34
#define gen_REGION_cons gen_effect_cons
35
#define gen_region_cons gen_effect_cons
36
37
#define region_undefined effect_undefined
38
#define region_undefined_p(reg) effect_undefined_p((reg))
39
#define make_region(reference,action,approximation,system) \
40
make_effect(make_cell(is_cell_reference, (reference)), \
41
(action), (approximation), \
42
make_descriptor(is_descriptor_convex,system))
43
/* To be avoided. Use region_any_reference() instead.
44
I definitely remove this one : it is too dangerous. BC.
45
FC: it should not compile, rather than compile and fail???
46
*/
47
/*
48
// v1
49
#define region_reference(reg) \
50
preference_reference(cell_preference(effect_cell(reg)))
51
// v2
52
#define region_reference(reg) \
53
pips_internal_error("region_reference is not defined anymore \n")
54
// v3: nothing, should break compilation or link
55
*/
56
#define region_any_reference(reg) \
57
(cell_preference_p(effect_cell(reg)) ? preference_reference(cell_preference(effect_cell(reg))) : cell_reference(effect_cell(reg)))
58
#define region_action(reg) effect_action(reg)
59
#define region_approximation(reg) effect_approximation(reg)
60
#define region_context(reg) effect_context(reg)
61
#define region_cell(reg) effect_cell(reg)
62
63
#define region_entity(reg) reference_variable(region_any_reference(reg))
64
#define region_action_tag(reg) action_tag(effect_action(reg))
65
#define region_approximation_tag(reg) \
66
approximation_tag(effect_approximation(reg))
67
#define region_system_(reg) \
68
descriptor_convex_(effect_descriptor(reg))
69
#define region_system(reg) \
70
descriptor_convex(effect_descriptor(reg))
71
72
/* useful region macros */
73
74
#define region_read_p(reg) (action_tag(effect_action(reg))==is_action_read)
75
#define region_write_p(reg) (action_tag(effect_action(reg))==is_action_write)
76
#define region_may_p(reg) \
77
(approximation_tag(effect_approximation(reg)) == is_approximation_may)
78
#define region_must_p(reg) \
79
(approximation_tag(effect_approximation(reg)) == is_approximation_must)
80
#define region_exact_p(reg) \
81
(approximation_tag(effect_approximation(reg)) == is_approximation_exact)
82
#define region_empty_p(reg) sc_empty_p(region_system(reg))
83
#define region_rn_p(reg) sc_rn_p(region_system(reg))
84
#define region_scalar_p(reg) (anywhere_effect_p(reg) || entity_scalar_p(region_entity(reg)))
85
#define effect_region_p(e) (descriptor_convex_p(effect_descriptor(e)))
86
87
/* consistency checking */
88
#define debug_regions_consistency(l_reg)\
89
ifdebug(1){regions_consistent_p(l_reg);}
90
#define debug_region_consistency(reg)\
91
ifdebug(1){region_consistent_p(reg);}
92
93
/* convenient debug messages */
94
#define debug_print_region(level, message, region) \
95
ifdebug(level) { pips_debug(level, "%s\n"
, message); print_region(region);}
96
97
/* other things */
98
99
100
101
#define R_RW 0
102
#define R_IN 1
103
#define R_OUT 2
104
105
#define SEQUENTIAL_REGION_SUFFIX ".reg"
106
#define SEQUENTIAL_PROPER_REGION_SUFFIX ".preg"
107
#define USER_REGION_SUFFIX ".ureg"
108
#define SEQUENTIAL_IN_REGION_SUFFIX ".inreg"
109
#define USER_IN_REGION_SUFFIX ".uinreg"
110
#define SEQUENTIAL_OUT_REGION_SUFFIX ".outreg"
111
#define USER_OUT_REGION_SUFFIX ".uoutreg"
112
113
#define NB_MAX_ARRAY_DIM 12
pips
src
Libs
effects-convex
effects-convex-local.h
Generated on Thu Sep 26 2024 22:11:35 for PIPS by
1.9.1