PIPS
naming-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: naming.h$
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 /* special characters to build entity names of various kinds
26  */
27 #define MODULE_SEP ':'
28 #define MODULE_SEP_CHAR MODULE_SEP
29 
30 #define MODULE_SEP_STRING ":"
31 #define LABEL_PREFIX "@"
32 #define MAIN_PREFIX "%"
33 #define MAIN_PREFIX_CHAR '%'
34 #define COMMON_PREFIX "~"
35 #define BLOCKDATA_PREFIX "&"
36 #define F95MODULE_PREFIX "\xa4" // unicode character CURRENCY SIGN
37 
38 #define FILE_SEP_CHAR '!'
39 #define FILE_SEP FILE_SEP_CHAR
40 
41 #define FILE_SEP_STRING "!"
42 
43 #define MODULE_NAME_CHARS \
44  ( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
45  "0123456789" \
46  "abcdefghijklmnopqrstuvwxyz" \
47  FILE_SEP_STRING MODULE_SEP_STRING "|_#-." )
48 
49 /* Scope separator */
50 #define BLOCK_SEP_STRING "`"
51 #define BLOCK_SEP_CHAR '`'
52 
53 #define MEMBER_SEP_STRING "^"
54 #define MEMBER_SEP_CHAR '^'
55 
56 #define STRUCT_PREFIX "#" // Conflict with value naming in transformer
57 #define STRUCT_PREFIX_CHAR '#'
58 #define UNION_PREFIX "'" /* Conflict with C character constants */
59 #define UNION_PREFIX_CHAR '\''
60 #define ENUM_PREFIX "?"
61 #define ENUM_PREFIX_CHAR '?'
62 #define TYPEDEF_PREFIX "$"
63 #define TYPEDEF_PREFIX_CHAR '$'
64 
65 /* constant names
66  */
67 #define F95_USE_LOCAL_NAME "*USE*"
68 #define BLANK_COMMON_LOCAL_NAME "*BLANK*"
69 #define DYNAMIC_AREA_LOCAL_NAME "*DYNAMIC*"
70 #define STATIC_AREA_LOCAL_NAME "*STATIC*"
71 #define HEAP_AREA_LOCAL_NAME "*HEAP*"
72 #define STACK_AREA_LOCAL_NAME "*STACK*"
73 #define ALLOCATABLE_AREA_LOCAL_NAME "*ALLOCATABLE*"
74 // The formal area could have been used for formal parameters
75 // It is used for the formal context of a function in points-to analysis
76 #define FORMAL_AREA_LOCAL_NAME "*FORMAL*"
77 #define POINTER_DUMMY_TARGETS_AREA_LOCAL_NAME "*POINTER_DUMMY_TARGETS*"
78 
79 /* The set of all memory areas. FI: this macro is now obsolete and
80  should be removed when a new version of alias-classes is
81  introduced. Too bad ri-util/effects.c is going to depend on
82  alias-classes*/
83 #define ALL_MEMORY_ENTITY_NAME "TOP-LEVEL:*MEMORY*"
84 
85 /* For enum and struct and union without names (see c_syntax/cyacc.y) */
86 #define DUMMY_ENUM_PREFIX "_PIPS_ENUM_"
87 #define DUMMY_STRUCT_PREFIX "_PIPS_STRUCT_"
88 #define DUMMY_UNION_PREFIX "_PIPS_UNION_"
89 #define DUMMY_ABSTRACT_PREFIX "_PIPS_ABSTRACT_"
90 #define DUMMY_MEMBER_PREFIX "_PIPS_MEMBER_" /* For bit fields */
91 
92 /* For dmmmy parameters in functions declarations */
93 #define DUMMY_PARAMETER_PREFIX "DUMMY-PARAMETER-"
94 
95 /* Its value is "@", the label prefix followed by nothing */
96 #define EMPTY_LABEL_NAME LABEL_PREFIX
97 #define LIST_DIRECTED_FORMAT_NAME "LIST-DIRECTED"
98 
99 
100 /* Module containing the global variables in Fortran and C */
101 #define TOP_LEVEL_MODULE_NAME "TOP-LEVEL"
102 /* Module containing stub variables used to initialize intraprocedural
103  points-to in C */
104 #define POINTS_TO_MODULE_NAME "*POINTS-TO-MODULE*"
105 
106 #define RETURN_LABEL_NAME "00000"
107 
108 /* In C, the module name may include file names, the compilation unit
109  * name and the user name of the function. It goes well beyond the 36
110  * of Fortan (check the standard).
111 */
112 #define MAXIMAL_MODULE_NAME_SIZE 100
113 
114 /* Constants for pragma management */
115 #define C_PRAGMA_HEADER_STRING "#pragma"
116 #define FORTRAN_PRAGMA_HEADER_STRING "!$"
117 #define FORTRAN_OMP_CONTINUATION_STRING "\n!$omp& "