added new directives
This commit is contained in:
@@ -574,6 +574,7 @@
|
||||
#define ACC_CHECKSECTION_DIR 911 /* ACC Fortran */
|
||||
#define ACC_END_CHECKSECTION_DIR 912 /* ACC Fortran */
|
||||
#define ACC_ROUTINE_DIR 913 /* ACC Fortran */
|
||||
#define ACC_DECLARE_DIR 914 /* ACC Fortran */
|
||||
|
||||
#define ACC_TIE_OP 930 /* ACC Fortran */
|
||||
#define ACC_INLOCAL_OP 931 /* ACC Fortran */
|
||||
|
||||
@@ -576,6 +576,7 @@ script using "tag". Run make tag.h to regenerate this file */
|
||||
tag [ ACC_CHECKSECTION_DIR ] = "ACC_CHECKSECTION_DIR";
|
||||
tag [ ACC_END_CHECKSECTION_DIR ] = "ACC_END_CHECKSECTION_DIR";
|
||||
tag [ ACC_ROUTINE_DIR ] = "ACC_ROUTINE_DIR";
|
||||
tag [ ACC_DECLARE_DIR ] = "ACC_DECLARE_DIR";
|
||||
|
||||
tag [ ACC_TIE_OP ] = "ACC_TIE_OP";
|
||||
tag [ ACC_INLOCAL_OP ] = "ACC_INLOCAL_OP";
|
||||
|
||||
@@ -443,6 +443,7 @@ DEFNODECODE(DUMMY_REF, "nodetext",'r',0,LLNODE, '_','_','s','_','_')
|
||||
DEFNODECODE(ACC_CALL_STMT,"nodetext",'s',2,BIFNODE, '_','_','_','_','_')
|
||||
DEFNODECODE(DVM_NEW_VALUE_DIR,"nodetext",'s',1,BIFNODE, '_','_','_','_','_')
|
||||
DEFNODECODE(ACC_ROUTINE_DIR,"nodetext",'s',1,BIFNODE, '_','_','_','_','_')
|
||||
DEFNODECODE(ACC_DECLARE_DIR,"nodetext",'s',1,BIFNODE, '_','_','_','_','_')
|
||||
|
||||
/* SAPFOR */
|
||||
DEFNODECODE(SPF_NOINLINE_OP, "nodetext",'e',0,LLNODE, '_','_','_','_','_')
|
||||
|
||||
@@ -270,7 +270,9 @@ DEFNODECODE(ACC_CHECKSECTION_DIR, "%CMNT!DVM$%PUTTABCOMTHOSTSECTION%NL",
|
||||
's',0,BIFNODE)
|
||||
DEFNODECODE(ACC_END_CHECKSECTION_DIR,"%CMNT!DVM$%PUTTABCOMTEND HOSTSECTION%NL",
|
||||
's',0,BIFNODE)
|
||||
DEFNODECODE(ACC_ROUTINE_DIR, "%CMNT!DVM$%PUTTABCOMTROUTINE %LL1%NL",
|
||||
DEFNODECODE(ACC_ROUTINE_DIR, "%CMNT!DVM$%PUTTABCOMTROUTINE%IF(%LL1!=%NULL), %LL1%NL",
|
||||
's',1,BIFNODE)
|
||||
DEFNODECODE(ACC_DECLARE_DIR, "%CMNT!DVM$%PUTTABCOMTDECLARE %LL1%NL",
|
||||
's',1,BIFNODE)
|
||||
|
||||
DEFNODECODE(OMP_NOWAIT, "NOWAIT",
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
#define ACC_CHECKSECTION_DIR 911 /* ACC Fortran */
|
||||
#define ACC_END_CHECKSECTION_DIR 912 /* ACC Fortran */
|
||||
#define ACC_ROUTINE_DIR 913 /* ACC Fortran */
|
||||
#define ACC_DECLARE_DIR 914 /* ACC Fortran */
|
||||
|
||||
#define ACC_TIE_OP 930 /* ACC Fortran */
|
||||
#define ACC_INLOCAL_OP 931 /* ACC Fortran */
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
acc_specification: acc_declare
|
||||
| acc_routine
|
||||
;
|
||||
acc_directive: acc_region
|
||||
| acc_end_region
|
||||
| acc_checksection
|
||||
| acc_end_checksection
|
||||
| acc_get_actual
|
||||
| acc_actual
|
||||
| acc_routine
|
||||
;
|
||||
|
||||
acc_region: ACC_REGION end_spec opt_clause
|
||||
@@ -99,13 +101,45 @@ acc_end_checksection: ACC_END_CHECKSECTION
|
||||
{ $$ = get_bfnd(fi,ACC_END_CHECKSECTION_DIR,SMNULL,LLNULL,LLNULL,LLNULL);}
|
||||
;
|
||||
|
||||
acc_routine: ACC_ROUTINE in_dcl opt_targets_clause
|
||||
acc_declare: ACC_DECLARE in_dcl opt_double_colon acc_declare_list
|
||||
{
|
||||
$$ = get_bfnd(fi,ACC_DECLARE_DIR, SMNULL, $4, LLNULL, LLNULL);
|
||||
}
|
||||
;
|
||||
acc_declare_list: declare_var
|
||||
{ $$ = make_llnd(fi,EXPR_LIST, $1, LLNULL, SMNULL); }
|
||||
| acc_declare_list COMMA declare_var
|
||||
{ $$ = set_ll_list($1, $3, EXPR_LIST); }
|
||||
;
|
||||
|
||||
declare_var: name
|
||||
{
|
||||
PTR_SYMB s;
|
||||
s = make_scalar($1,TYNULL,LOCAL);
|
||||
if((s->attr & PROCESSORS_BIT) ||(s->attr & TASK_BIT) || (s->attr & TEMPLATE_BIT) || (s->attr & ALIGN_BIT) || (s->attr & DISTRIBUTE_BIT) || (s->attr & DYNAMIC_BIT) || (s->attr & HEAP_BIT)|| (s->attr & DVM_POINTER_BIT) || (s->attr & INHERIT_BIT) ||(s->attr & SHADOW_BIT))
|
||||
errstr("Inconsistent declaration of identifier %s", s->ident, 16);
|
||||
$$ = make_llnd(fi,VAR_REF, LLNULL, LLNULL, s);
|
||||
}
|
||||
;
|
||||
|
||||
acc_routine: ACC_ROUTINE in_dcl opt_routine_clauses
|
||||
{ $$ = get_bfnd(fi,ACC_ROUTINE_DIR,SMNULL,$3,LLNULL,LLNULL);}
|
||||
;
|
||||
|
||||
opt_targets_clause: needkeyword keywordoff
|
||||
opt_routine_clauses:
|
||||
{ $$ = LLNULL;}
|
||||
| needkeyword targets_clause
|
||||
{ $$ = $2;}
|
||||
| routine_clause_list
|
||||
{ $$ = $1;}
|
||||
;
|
||||
|
||||
routine_clause_list: routine_clause
|
||||
{ $$ = set_ll_list($1,LLNULL,EXPR_LIST); }
|
||||
| routine_clause_list routine_clause
|
||||
{ $$ = set_ll_list($1,$2,EXPR_LIST); }
|
||||
;
|
||||
|
||||
routine_clause: COMMA needkeyword PRIVATE LEFTPAR acc_declare_list RIGHTPAR
|
||||
{ $$ = make_llnd(fi,ACC_PRIVATE_OP,$5,LLNULL,SMNULL);}
|
||||
| COMMA needkeyword targets_clause
|
||||
{ $$ = $3;}
|
||||
;
|
||||
|
||||
@@ -269,10 +269,12 @@ static int in_vec = NO; /* set if processing array constructor */
|
||||
%type <ll_node> paralleldo_clause_list paralleldo_clause
|
||||
|
||||
/* FORTRAN ACC */
|
||||
%type <bf_node> acc_specification acc_declare
|
||||
%type <bf_node> acc_directive acc_region acc_end_region acc_checksection acc_end_checksection
|
||||
%type <bf_node> acc_get_actual acc_actual acc_routine
|
||||
%type <ll_node> opt_clause acc_clause_list acc_clause data_clause async_clause targets_clause
|
||||
%type <ll_node> acc_var_list computer_list computer opt_targets_clause
|
||||
%type <ll_node> acc_var_list computer_list computer opt_routine_clauses routine_clause_list routine_clause
|
||||
%type <ll_node> acc_declare_list declare_var
|
||||
|
||||
/* new clauses for PARALLEL directive */
|
||||
%type <ll_node> private_spec cuda_block_spec sizelist
|
||||
@@ -852,6 +854,7 @@ spec: type_dcl
|
||||
| common
|
||||
| dimension
|
||||
| dvm_specification /* FDVM */
|
||||
| acc_specification /* FDVM */
|
||||
| external
|
||||
| intrinsic
|
||||
| equivalence
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +1,13 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@@ -16,9 +15,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
@@ -33,12 +30,21 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YY_YY_GRAM1_TAB_H_INCLUDED
|
||||
# define YY_YY_GRAM1_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
enum yytokentype
|
||||
{
|
||||
PERCENT = 1,
|
||||
AMPERSAND = 2,
|
||||
ASTER = 3,
|
||||
@@ -359,411 +365,54 @@
|
||||
ACC_CUDA_BLOCK = 318,
|
||||
ACC_ROUTINE = 319,
|
||||
ACC_TIE = 320,
|
||||
BY = 321,
|
||||
IO_MODE = 322,
|
||||
CP_CREATE = 323,
|
||||
CP_LOAD = 324,
|
||||
CP_SAVE = 325,
|
||||
CP_WAIT = 326,
|
||||
FILES = 327,
|
||||
VARLIST = 328,
|
||||
STATUS = 329,
|
||||
EXITINTERVAL = 330,
|
||||
TEMPLATE_CREATE = 331,
|
||||
TEMPLATE_DELETE = 332,
|
||||
SPF_ANALYSIS = 333,
|
||||
SPF_PARALLEL = 334,
|
||||
SPF_TRANSFORM = 335,
|
||||
SPF_NOINLINE = 336,
|
||||
SPF_PARALLEL_REG = 337,
|
||||
SPF_END_PARALLEL_REG = 338,
|
||||
SPF_EXPAND = 339,
|
||||
SPF_FISSION = 340,
|
||||
SPF_SHRINK = 341,
|
||||
SPF_CHECKPOINT = 342,
|
||||
SPF_EXCEPT = 343,
|
||||
SPF_FILES_COUNT = 344,
|
||||
SPF_INTERVAL = 345,
|
||||
SPF_TIME = 346,
|
||||
SPF_ITER = 347,
|
||||
SPF_FLEXIBLE = 348,
|
||||
SPF_APPLY_REGION = 349,
|
||||
SPF_APPLY_FRAGMENT = 350,
|
||||
SPF_CODE_COVERAGE = 351,
|
||||
SPF_UNROLL = 352,
|
||||
SPF_MERGE = 353,
|
||||
SPF_COVER = 354,
|
||||
SPF_PROCESS_PRIVATE = 355,
|
||||
BINARY_OP = 358,
|
||||
UNARY_OP = 359
|
||||
ACC_DECLARE = 321,
|
||||
BY = 322,
|
||||
IO_MODE = 323,
|
||||
CP_CREATE = 324,
|
||||
CP_LOAD = 325,
|
||||
CP_SAVE = 326,
|
||||
CP_WAIT = 327,
|
||||
FILES = 328,
|
||||
VARLIST = 329,
|
||||
STATUS = 330,
|
||||
EXITINTERVAL = 331,
|
||||
TEMPLATE_CREATE = 332,
|
||||
TEMPLATE_DELETE = 333,
|
||||
SPF_ANALYSIS = 334,
|
||||
SPF_PARALLEL = 335,
|
||||
SPF_TRANSFORM = 336,
|
||||
SPF_NOINLINE = 337,
|
||||
SPF_PARALLEL_REG = 338,
|
||||
SPF_END_PARALLEL_REG = 339,
|
||||
SPF_EXPAND = 340,
|
||||
SPF_FISSION = 341,
|
||||
SPF_SHRINK = 342,
|
||||
SPF_CHECKPOINT = 343,
|
||||
SPF_EXCEPT = 344,
|
||||
SPF_FILES_COUNT = 345,
|
||||
SPF_INTERVAL = 346,
|
||||
SPF_TIME = 347,
|
||||
SPF_ITER = 348,
|
||||
SPF_FLEXIBLE = 349,
|
||||
SPF_APPLY_REGION = 350,
|
||||
SPF_APPLY_FRAGMENT = 351,
|
||||
SPF_CODE_COVERAGE = 352,
|
||||
SPF_UNROLL = 353,
|
||||
SPF_MERGE = 354,
|
||||
SPF_COVER = 355,
|
||||
SPF_PROCESS_PRIVATE = 356,
|
||||
BINARY_OP = 359,
|
||||
UNARY_OP = 360
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define PERCENT 1
|
||||
#define AMPERSAND 2
|
||||
#define ASTER 3
|
||||
#define CLUSTER 4
|
||||
#define COLON 5
|
||||
#define COMMA 6
|
||||
#define DASTER 7
|
||||
#define DEFINED_OPERATOR 8
|
||||
#define DOT 9
|
||||
#define DQUOTE 10
|
||||
#define GLOBAL_A 11
|
||||
#define LEFTAB 12
|
||||
#define LEFTPAR 13
|
||||
#define MINUS 14
|
||||
#define PLUS 15
|
||||
#define POINT_TO 16
|
||||
#define QUOTE 17
|
||||
#define RIGHTAB 18
|
||||
#define RIGHTPAR 19
|
||||
#define AND 20
|
||||
#define DSLASH 21
|
||||
#define EQV 22
|
||||
#define EQ 23
|
||||
#define EQUAL 24
|
||||
#define FFALSE 25
|
||||
#define GE 26
|
||||
#define GT 27
|
||||
#define LE 28
|
||||
#define LT 29
|
||||
#define NE 30
|
||||
#define NEQV 31
|
||||
#define NOT 32
|
||||
#define OR 33
|
||||
#define TTRUE 34
|
||||
#define SLASH 35
|
||||
#define XOR 36
|
||||
#define REFERENCE 37
|
||||
#define AT 38
|
||||
#define ACROSS 39
|
||||
#define ALIGN_WITH 40
|
||||
#define ALIGN 41
|
||||
#define ALLOCATABLE 42
|
||||
#define ALLOCATE 43
|
||||
#define ARITHIF 44
|
||||
#define ASSIGNMENT 45
|
||||
#define ASSIGN 46
|
||||
#define ASSIGNGOTO 47
|
||||
#define ASYNCHRONOUS 48
|
||||
#define ASYNCID 49
|
||||
#define ASYNCWAIT 50
|
||||
#define BACKSPACE 51
|
||||
#define BAD_CCONST 52
|
||||
#define BAD_SYMBOL 53
|
||||
#define BARRIER 54
|
||||
#define BLOCKDATA 55
|
||||
#define BLOCK 56
|
||||
#define BOZ_CONSTANT 57
|
||||
#define BYTE 58
|
||||
#define CALL 59
|
||||
#define CASE 60
|
||||
#define CHARACTER 61
|
||||
#define CHAR_CONSTANT 62
|
||||
#define CHECK 63
|
||||
#define CLOSE 64
|
||||
#define COMMON 65
|
||||
#define COMPLEX 66
|
||||
#define COMPGOTO 67
|
||||
#define CONSISTENT_GROUP 68
|
||||
#define CONSISTENT_SPEC 69
|
||||
#define CONSISTENT_START 70
|
||||
#define CONSISTENT_WAIT 71
|
||||
#define CONSISTENT 72
|
||||
#define CONSTRUCT_ID 73
|
||||
#define CONTAINS 74
|
||||
#define CONTINUE 75
|
||||
#define CORNER 76
|
||||
#define CYCLE 77
|
||||
#define DATA 78
|
||||
#define DEALLOCATE 79
|
||||
#define HPF_TEMPLATE 80
|
||||
#define DEBUG 81
|
||||
#define DEFAULT_CASE 82
|
||||
#define DEFINE 83
|
||||
#define DERIVED 84
|
||||
#define DIMENSION 85
|
||||
#define DISTRIBUTE 86
|
||||
#define DOWHILE 87
|
||||
#define DOUBLEPRECISION 88
|
||||
#define DOUBLECOMPLEX 89
|
||||
#define DP_CONSTANT 90
|
||||
#define DVM_POINTER 91
|
||||
#define DYNAMIC 92
|
||||
#define ELEMENTAL 93
|
||||
#define ELSE 94
|
||||
#define ELSEIF 95
|
||||
#define ELSEWHERE 96
|
||||
#define ENDASYNCHRONOUS 97
|
||||
#define ENDDEBUG 98
|
||||
#define ENDINTERVAL 99
|
||||
#define ENDUNIT 100
|
||||
#define ENDDO 101
|
||||
#define ENDFILE 102
|
||||
#define ENDFORALL 103
|
||||
#define ENDIF 104
|
||||
#define ENDINTERFACE 105
|
||||
#define ENDMODULE 106
|
||||
#define ENDON 107
|
||||
#define ENDSELECT 108
|
||||
#define ENDTASK_REGION 109
|
||||
#define ENDTYPE 110
|
||||
#define ENDWHERE 111
|
||||
#define ENTRY 112
|
||||
#define EXIT 113
|
||||
#define EOLN 114
|
||||
#define EQUIVALENCE 115
|
||||
#define ERROR 116
|
||||
#define EXTERNAL 117
|
||||
#define F90 118
|
||||
#define FIND 119
|
||||
#define FORALL 120
|
||||
#define FORMAT 121
|
||||
#define FUNCTION 122
|
||||
#define GATE 123
|
||||
#define GEN_BLOCK 124
|
||||
#define HEAP 125
|
||||
#define HIGH 126
|
||||
#define IDENTIFIER 127
|
||||
#define IMPLICIT 128
|
||||
#define IMPLICITNONE 129
|
||||
#define INCLUDE_TO 130
|
||||
#define INCLUDE 131
|
||||
#define INDEPENDENT 132
|
||||
#define INDIRECT_ACCESS 133
|
||||
#define INDIRECT_GROUP 134
|
||||
#define INDIRECT 135
|
||||
#define INHERIT 136
|
||||
#define INQUIRE 137
|
||||
#define INTERFACEASSIGNMENT 138
|
||||
#define INTERFACEOPERATOR 139
|
||||
#define INTERFACE 140
|
||||
#define INTRINSIC 141
|
||||
#define INTEGER 142
|
||||
#define INTENT 143
|
||||
#define INTERVAL 144
|
||||
#define INOUT 145
|
||||
#define IN 146
|
||||
#define INT_CONSTANT 147
|
||||
#define LABEL 148
|
||||
#define LABEL_DECLARE 149
|
||||
#define LET 150
|
||||
#define LOCALIZE 151
|
||||
#define LOGICAL 152
|
||||
#define LOGICALIF 153
|
||||
#define LOOP 154
|
||||
#define LOW 155
|
||||
#define MAXLOC 156
|
||||
#define MAX 157
|
||||
#define MAP 158
|
||||
#define MINLOC 159
|
||||
#define MIN 160
|
||||
#define MODULE_PROCEDURE 161
|
||||
#define MODULE 162
|
||||
#define MULT_BLOCK 163
|
||||
#define NAMEEQ 164
|
||||
#define NAMELIST 165
|
||||
#define NEW_VALUE 166
|
||||
#define NEW 167
|
||||
#define NULLIFY 168
|
||||
#define OCTAL_CONSTANT 169
|
||||
#define ONLY 170
|
||||
#define ON 171
|
||||
#define ON_DIR 172
|
||||
#define ONTO 173
|
||||
#define OPEN 174
|
||||
#define OPERATOR 175
|
||||
#define OPTIONAL 176
|
||||
#define OTHERWISE 177
|
||||
#define OUT 178
|
||||
#define OWN 179
|
||||
#define PARALLEL 180
|
||||
#define PARAMETER 181
|
||||
#define PAUSE 182
|
||||
#define PLAINDO 183
|
||||
#define PLAINGOTO 184
|
||||
#define POINTER 185
|
||||
#define POINTERLET 186
|
||||
#define PREFETCH 187
|
||||
#define PRINT 188
|
||||
#define PRIVATE 189
|
||||
#define PRODUCT 190
|
||||
#define PROGRAM 191
|
||||
#define PUBLIC 192
|
||||
#define PURE 193
|
||||
#define RANGE 194
|
||||
#define READ 195
|
||||
#define REALIGN_WITH 196
|
||||
#define REALIGN 197
|
||||
#define REAL 198
|
||||
#define REAL_CONSTANT 199
|
||||
#define RECURSIVE 200
|
||||
#define REDISTRIBUTE_NEW 201
|
||||
#define REDISTRIBUTE 202
|
||||
#define REDUCTION_GROUP 203
|
||||
#define REDUCTION_START 204
|
||||
#define REDUCTION_WAIT 205
|
||||
#define REDUCTION 206
|
||||
#define REMOTE_ACCESS_SPEC 207
|
||||
#define REMOTE_ACCESS 208
|
||||
#define REMOTE_GROUP 209
|
||||
#define RESET 210
|
||||
#define RESULT 211
|
||||
#define RETURN 212
|
||||
#define REWIND 213
|
||||
#define SAVE 214
|
||||
#define SECTION 215
|
||||
#define SELECT 216
|
||||
#define SEQUENCE 217
|
||||
#define SHADOW_ADD 218
|
||||
#define SHADOW_COMPUTE 219
|
||||
#define SHADOW_GROUP 220
|
||||
#define SHADOW_RENEW 221
|
||||
#define SHADOW_START_SPEC 222
|
||||
#define SHADOW_START 223
|
||||
#define SHADOW_WAIT_SPEC 224
|
||||
#define SHADOW_WAIT 225
|
||||
#define SHADOW 226
|
||||
#define STAGE 227
|
||||
#define STATIC 228
|
||||
#define STAT 229
|
||||
#define STOP 230
|
||||
#define SUBROUTINE 231
|
||||
#define SUM 232
|
||||
#define SYNC 233
|
||||
#define TARGET 234
|
||||
#define TASK 235
|
||||
#define TASK_REGION 236
|
||||
#define THEN 237
|
||||
#define TO 238
|
||||
#define TRACEON 239
|
||||
#define TRACEOFF 240
|
||||
#define TRUNC 241
|
||||
#define TYPE 242
|
||||
#define TYPE_DECL 243
|
||||
#define UNDER 244
|
||||
#define UNKNOWN 245
|
||||
#define USE 246
|
||||
#define VIRTUAL 247
|
||||
#define VARIABLE 248
|
||||
#define WAIT 249
|
||||
#define WHERE 250
|
||||
#define WHERE_ASSIGN 251
|
||||
#define WHILE 252
|
||||
#define WITH 253
|
||||
#define WRITE 254
|
||||
#define COMMENT 255
|
||||
#define WGT_BLOCK 256
|
||||
#define HPF_PROCESSORS 257
|
||||
#define IOSTAT 258
|
||||
#define ERR 259
|
||||
#define END 260
|
||||
#define OMPDVM_ATOMIC 261
|
||||
#define OMPDVM_BARRIER 262
|
||||
#define OMPDVM_COPYIN 263
|
||||
#define OMPDVM_COPYPRIVATE 264
|
||||
#define OMPDVM_CRITICAL 265
|
||||
#define OMPDVM_ONETHREAD 266
|
||||
#define OMPDVM_DO 267
|
||||
#define OMPDVM_DYNAMIC 268
|
||||
#define OMPDVM_ENDCRITICAL 269
|
||||
#define OMPDVM_ENDDO 270
|
||||
#define OMPDVM_ENDMASTER 271
|
||||
#define OMPDVM_ENDORDERED 272
|
||||
#define OMPDVM_ENDPARALLEL 273
|
||||
#define OMPDVM_ENDPARALLELDO 274
|
||||
#define OMPDVM_ENDPARALLELSECTIONS 275
|
||||
#define OMPDVM_ENDPARALLELWORKSHARE 276
|
||||
#define OMPDVM_ENDSECTIONS 277
|
||||
#define OMPDVM_ENDSINGLE 278
|
||||
#define OMPDVM_ENDWORKSHARE 279
|
||||
#define OMPDVM_FIRSTPRIVATE 280
|
||||
#define OMPDVM_FLUSH 281
|
||||
#define OMPDVM_GUIDED 282
|
||||
#define OMPDVM_LASTPRIVATE 283
|
||||
#define OMPDVM_MASTER 284
|
||||
#define OMPDVM_NOWAIT 285
|
||||
#define OMPDVM_NONE 286
|
||||
#define OMPDVM_NUM_THREADS 287
|
||||
#define OMPDVM_ORDERED 288
|
||||
#define OMPDVM_PARALLEL 289
|
||||
#define OMPDVM_PARALLELDO 290
|
||||
#define OMPDVM_PARALLELSECTIONS 291
|
||||
#define OMPDVM_PARALLELWORKSHARE 292
|
||||
#define OMPDVM_RUNTIME 293
|
||||
#define OMPDVM_SECTION 294
|
||||
#define OMPDVM_SECTIONS 295
|
||||
#define OMPDVM_SCHEDULE 296
|
||||
#define OMPDVM_SHARED 297
|
||||
#define OMPDVM_SINGLE 298
|
||||
#define OMPDVM_THREADPRIVATE 299
|
||||
#define OMPDVM_WORKSHARE 300
|
||||
#define OMPDVM_NODES 301
|
||||
#define OMPDVM_IF 302
|
||||
#define IAND 303
|
||||
#define IEOR 304
|
||||
#define IOR 305
|
||||
#define ACC_REGION 306
|
||||
#define ACC_END_REGION 307
|
||||
#define ACC_CHECKSECTION 308
|
||||
#define ACC_END_CHECKSECTION 309
|
||||
#define ACC_GET_ACTUAL 310
|
||||
#define ACC_ACTUAL 311
|
||||
#define ACC_TARGETS 312
|
||||
#define ACC_ASYNC 313
|
||||
#define ACC_HOST 314
|
||||
#define ACC_CUDA 315
|
||||
#define ACC_LOCAL 316
|
||||
#define ACC_INLOCAL 317
|
||||
#define ACC_CUDA_BLOCK 318
|
||||
#define ACC_ROUTINE 319
|
||||
#define ACC_TIE 320
|
||||
#define BY 321
|
||||
#define IO_MODE 322
|
||||
#define CP_CREATE 323
|
||||
#define CP_LOAD 324
|
||||
#define CP_SAVE 325
|
||||
#define CP_WAIT 326
|
||||
#define FILES 327
|
||||
#define VARLIST 328
|
||||
#define STATUS 329
|
||||
#define EXITINTERVAL 330
|
||||
#define TEMPLATE_CREATE 331
|
||||
#define TEMPLATE_DELETE 332
|
||||
#define SPF_ANALYSIS 333
|
||||
#define SPF_PARALLEL 334
|
||||
#define SPF_TRANSFORM 335
|
||||
#define SPF_NOINLINE 336
|
||||
#define SPF_PARALLEL_REG 337
|
||||
#define SPF_END_PARALLEL_REG 338
|
||||
#define SPF_EXPAND 339
|
||||
#define SPF_FISSION 340
|
||||
#define SPF_SHRINK 341
|
||||
#define SPF_CHECKPOINT 342
|
||||
#define SPF_EXCEPT 343
|
||||
#define SPF_FILES_COUNT 344
|
||||
#define SPF_INTERVAL 345
|
||||
#define SPF_TIME 346
|
||||
#define SPF_ITER 347
|
||||
#define SPF_FLEXIBLE 348
|
||||
#define SPF_APPLY_REGION 349
|
||||
#define SPF_APPLY_FRAGMENT 350
|
||||
#define SPF_CODE_COVERAGE 351
|
||||
#define SPF_UNROLL 352
|
||||
#define SPF_MERGE 353
|
||||
#define SPF_COVER 354
|
||||
#define SPF_PROCESS_PRIVATE 355
|
||||
#define BINARY_OP 358
|
||||
#define UNARY_OP 359
|
||||
|
||||
|
||||
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 438 "gram1.y"
|
||||
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 439 "gram1.y" /* yacc.c:1909 */
|
||||
|
||||
int token;
|
||||
char charv;
|
||||
char *charp;
|
||||
@@ -773,14 +422,18 @@ typedef union YYSTYPE
|
||||
PTR_TYPE data_type;
|
||||
PTR_HASH hash_entry;
|
||||
PTR_LABEL label;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 779 "gram1.tab.h"
|
||||
YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
|
||||
#line 427 "gram1.tab.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
#endif /* !YY_YY_GRAM1_TAB_H_INCLUDED */
|
||||
|
||||
@@ -318,41 +318,42 @@
|
||||
%token ACC_CUDA_BLOCK 318
|
||||
%token ACC_ROUTINE 319
|
||||
%token ACC_TIE 320
|
||||
%token BY 321
|
||||
%token IO_MODE 322
|
||||
%token CP_CREATE 323
|
||||
%token CP_LOAD 324
|
||||
%token CP_SAVE 325
|
||||
%token CP_WAIT 326
|
||||
%token FILES 327
|
||||
%token VARLIST 328
|
||||
%token STATUS 329
|
||||
%token EXITINTERVAL 330
|
||||
%token TEMPLATE_CREATE 331
|
||||
%token TEMPLATE_DELETE 332
|
||||
%token SPF_ANALYSIS 333
|
||||
%token SPF_PARALLEL 334
|
||||
%token SPF_TRANSFORM 335
|
||||
%token SPF_NOINLINE 336
|
||||
%token SPF_PARALLEL_REG 337
|
||||
%token SPF_END_PARALLEL_REG 338
|
||||
%token SPF_EXPAND 339
|
||||
%token SPF_FISSION 340
|
||||
%token SPF_SHRINK 341
|
||||
%token SPF_CHECKPOINT 342
|
||||
%token SPF_EXCEPT 343
|
||||
%token SPF_FILES_COUNT 344
|
||||
%token SPF_INTERVAL 345
|
||||
%token SPF_TIME 346
|
||||
%token SPF_ITER 347
|
||||
%token SPF_FLEXIBLE 348
|
||||
%token SPF_APPLY_REGION 349
|
||||
%token SPF_APPLY_FRAGMENT 350
|
||||
%token SPF_CODE_COVERAGE 351
|
||||
%token SPF_UNROLL 352
|
||||
%token SPF_MERGE 353
|
||||
%token SPF_COVER 354
|
||||
%token SPF_PROCESS_PRIVATE 355
|
||||
%token ACC_DECLARE 321
|
||||
%token BY 322
|
||||
%token IO_MODE 323
|
||||
%token CP_CREATE 324
|
||||
%token CP_LOAD 325
|
||||
%token CP_SAVE 326
|
||||
%token CP_WAIT 327
|
||||
%token FILES 328
|
||||
%token VARLIST 329
|
||||
%token STATUS 330
|
||||
%token EXITINTERVAL 331
|
||||
%token TEMPLATE_CREATE 332
|
||||
%token TEMPLATE_DELETE 333
|
||||
%token SPF_ANALYSIS 334
|
||||
%token SPF_PARALLEL 335
|
||||
%token SPF_TRANSFORM 336
|
||||
%token SPF_NOINLINE 337
|
||||
%token SPF_PARALLEL_REG 338
|
||||
%token SPF_END_PARALLEL_REG 339
|
||||
%token SPF_EXPAND 340
|
||||
%token SPF_FISSION 341
|
||||
%token SPF_SHRINK 342
|
||||
%token SPF_CHECKPOINT 343
|
||||
%token SPF_EXCEPT 344
|
||||
%token SPF_FILES_COUNT 345
|
||||
%token SPF_INTERVAL 346
|
||||
%token SPF_TIME 347
|
||||
%token SPF_ITER 348
|
||||
%token SPF_FLEXIBLE 349
|
||||
%token SPF_APPLY_REGION 350
|
||||
%token SPF_APPLY_FRAGMENT 351
|
||||
%token SPF_CODE_COVERAGE 352
|
||||
%token SPF_UNROLL 353
|
||||
%token SPF_MERGE 354
|
||||
%token SPF_COVER 355
|
||||
%token SPF_PROCESS_PRIVATE 356
|
||||
|
||||
%{
|
||||
#include <string.h>
|
||||
@@ -624,10 +625,12 @@ static int in_vec = NO; /* set if processing array constructor */
|
||||
%type <ll_node> paralleldo_clause_list paralleldo_clause
|
||||
|
||||
/* FORTRAN ACC */
|
||||
%type <bf_node> acc_specification acc_declare
|
||||
%type <bf_node> acc_directive acc_region acc_end_region acc_checksection acc_end_checksection
|
||||
%type <bf_node> acc_get_actual acc_actual acc_routine
|
||||
%type <ll_node> opt_clause acc_clause_list acc_clause data_clause async_clause targets_clause
|
||||
%type <ll_node> acc_var_list computer_list computer opt_targets_clause
|
||||
%type <ll_node> acc_var_list computer_list computer opt_routine_clauses routine_clause_list routine_clause
|
||||
%type <ll_node> acc_declare_list declare_var
|
||||
|
||||
/* new clauses for PARALLEL directive */
|
||||
%type <ll_node> private_spec cuda_block_spec sizelist
|
||||
@@ -1207,6 +1210,7 @@ spec: type_dcl
|
||||
| common
|
||||
| dimension
|
||||
| dvm_specification /* FDVM */
|
||||
| acc_specification /* FDVM */
|
||||
| external
|
||||
| intrinsic
|
||||
| equivalence
|
||||
@@ -7845,13 +7849,15 @@ op_slash_0 : {
|
||||
operator_slash = 0;
|
||||
};
|
||||
|
||||
acc_specification: acc_declare
|
||||
| acc_routine
|
||||
;
|
||||
acc_directive: acc_region
|
||||
| acc_end_region
|
||||
| acc_checksection
|
||||
| acc_end_checksection
|
||||
| acc_get_actual
|
||||
| acc_actual
|
||||
| acc_routine
|
||||
;
|
||||
|
||||
acc_region: ACC_REGION end_spec opt_clause
|
||||
@@ -7946,16 +7952,48 @@ acc_end_checksection: ACC_END_CHECKSECTION
|
||||
{ $$ = get_bfnd(fi,ACC_END_CHECKSECTION_DIR,SMNULL,LLNULL,LLNULL,LLNULL);}
|
||||
;
|
||||
|
||||
acc_routine: ACC_ROUTINE in_dcl opt_targets_clause
|
||||
acc_declare: ACC_DECLARE in_dcl opt_double_colon acc_declare_list
|
||||
{
|
||||
$$ = get_bfnd(fi,ACC_DECLARE_DIR, SMNULL, $4, LLNULL, LLNULL);
|
||||
}
|
||||
;
|
||||
acc_declare_list: declare_var
|
||||
{ $$ = make_llnd(fi,EXPR_LIST, $1, LLNULL, SMNULL); }
|
||||
| acc_declare_list COMMA declare_var
|
||||
{ $$ = set_ll_list($1, $3, EXPR_LIST); }
|
||||
;
|
||||
|
||||
declare_var: name
|
||||
{
|
||||
PTR_SYMB s;
|
||||
s = make_scalar($1,TYNULL,LOCAL);
|
||||
if((s->attr & PROCESSORS_BIT) ||(s->attr & TASK_BIT) || (s->attr & TEMPLATE_BIT) || (s->attr & ALIGN_BIT) || (s->attr & DISTRIBUTE_BIT) || (s->attr & DYNAMIC_BIT) || (s->attr & HEAP_BIT)|| (s->attr & DVM_POINTER_BIT) || (s->attr & INHERIT_BIT) ||(s->attr & SHADOW_BIT))
|
||||
errstr("Inconsistent declaration of identifier %s", s->ident, 16);
|
||||
$$ = make_llnd(fi,VAR_REF, LLNULL, LLNULL, s);
|
||||
}
|
||||
;
|
||||
|
||||
acc_routine: ACC_ROUTINE in_dcl opt_routine_clauses
|
||||
{ $$ = get_bfnd(fi,ACC_ROUTINE_DIR,SMNULL,$3,LLNULL,LLNULL);}
|
||||
;
|
||||
|
||||
opt_targets_clause: needkeyword keywordoff
|
||||
opt_routine_clauses:
|
||||
{ $$ = LLNULL;}
|
||||
| needkeyword targets_clause
|
||||
{ $$ = $2;}
|
||||
| routine_clause_list
|
||||
{ $$ = $1;}
|
||||
;
|
||||
|
||||
routine_clause_list: routine_clause
|
||||
{ $$ = set_ll_list($1,LLNULL,EXPR_LIST); }
|
||||
| routine_clause_list routine_clause
|
||||
{ $$ = set_ll_list($1,$2,EXPR_LIST); }
|
||||
;
|
||||
|
||||
routine_clause: COMMA needkeyword PRIVATE LEFTPAR acc_declare_list RIGHTPAR
|
||||
{ $$ = make_llnd(fi,ACC_PRIVATE_OP,$5,LLNULL,SMNULL);}
|
||||
| COMMA needkeyword targets_clause
|
||||
{ $$ = $3;}
|
||||
;
|
||||
spf_directive: spf_analysis
|
||||
| spf_parallel
|
||||
| spf_transform
|
||||
|
||||
@@ -2214,6 +2214,9 @@ analyz()
|
||||
} else if (eqn(13, nextch, "doublecomplex")) {
|
||||
stkey = DOUBLECOMPLEX;
|
||||
nextch += 13;
|
||||
} else if (eqn(7, nextch, "declare")) { /*ACC*/
|
||||
stkey = ACC_DECLARE;
|
||||
nextch += 7;
|
||||
} else if (eqn(2, nextch, "do")) { /*OMP*/
|
||||
if (OMP_program == 1) { /*OMP*/
|
||||
stkey = OMPDVM_DO; /*OMP*/
|
||||
|
||||
@@ -788,6 +788,7 @@ set_stat_list(old_list, stat)
|
||||
case (DVM_CONSISTENT_DIR):
|
||||
case (DVM_ASYNCID_DIR):
|
||||
case (ACC_ROUTINE_DIR):
|
||||
case (ACC_DECLARE_DIR):
|
||||
case (DATA_DECL):
|
||||
case (EXTERN_STAT):
|
||||
case (INTRIN_STAT):
|
||||
|
||||
@@ -1952,6 +1952,8 @@ copy_module_scope(sym_mod,list)
|
||||
continue;
|
||||
if(list && in_rename_list(source,list))
|
||||
continue;
|
||||
if(!strcmp(source->ident, "***"))
|
||||
continue;
|
||||
if((copy=just_look_up_sym_in_scope(cur_scope(),source->ident)) && copy->id_attr && copy->id_attr->entry.Template.tag==sym_mod->entry.Template.func_hedr->id)
|
||||
continue;
|
||||
new_symb = make_local_entity(source->parent, source->variant, source->type, LOCAL);
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
#define ACC_CHECKSECTION_DIR 911 /* ACC Fortran */
|
||||
#define ACC_END_CHECKSECTION_DIR 912 /* ACC Fortran */
|
||||
#define ACC_ROUTINE_DIR 913 /* ACC Fortran */
|
||||
#define ACC_DECLARE_DIR 914 /* ACC Fortran */
|
||||
|
||||
#define ACC_TIE_OP 930 /* ACC Fortran */
|
||||
#define ACC_INLOCAL_OP 931 /* ACC Fortran */
|
||||
|
||||
@@ -576,6 +576,7 @@ script using "tag". Run make tag.h to regenerate this file */
|
||||
tag [ ACC_CHECKSECTION_DIR ] = "ACC_CHECKSECTION_DIR";
|
||||
tag [ ACC_END_CHECKSECTION_DIR ] = "ACC_END_CHECKSECTION_DIR";
|
||||
tag [ ACC_ROUTINE_DIR ] = "ACC_ROUTINE_DIR";
|
||||
tag [ ACC_DECLARE_DIR ] = "ACC_DECLARE_DIR";
|
||||
|
||||
tag [ ACC_TIE_OP ] = "ACC_TIE_OP";
|
||||
tag [ ACC_INLOCAL_OP ] = "ACC_INLOCAL_OP";
|
||||
|
||||
@@ -318,38 +318,39 @@
|
||||
#define ACC_CUDA_BLOCK 318
|
||||
#define ACC_ROUTINE 319
|
||||
#define ACC_TIE 320
|
||||
#define BY 321
|
||||
#define IO_MODE 322
|
||||
#define CP_CREATE 323
|
||||
#define CP_LOAD 324
|
||||
#define CP_SAVE 325
|
||||
#define CP_WAIT 326
|
||||
#define FILES 327
|
||||
#define VARLIST 328
|
||||
#define STATUS 329
|
||||
#define EXITINTERVAL 330
|
||||
#define TEMPLATE_CREATE 331
|
||||
#define TEMPLATE_DELETE 332
|
||||
#define SPF_ANALYSIS 333
|
||||
#define SPF_PARALLEL 334
|
||||
#define SPF_TRANSFORM 335
|
||||
#define SPF_NOINLINE 336
|
||||
#define SPF_PARALLEL_REG 337
|
||||
#define SPF_END_PARALLEL_REG 338
|
||||
#define SPF_EXPAND 339
|
||||
#define SPF_FISSION 340
|
||||
#define SPF_SHRINK 341
|
||||
#define SPF_CHECKPOINT 342
|
||||
#define SPF_EXCEPT 343
|
||||
#define SPF_FILES_COUNT 344
|
||||
#define SPF_INTERVAL 345
|
||||
#define SPF_TIME 346
|
||||
#define SPF_ITER 347
|
||||
#define SPF_FLEXIBLE 348
|
||||
#define SPF_APPLY_REGION 349
|
||||
#define SPF_APPLY_FRAGMENT 350
|
||||
#define SPF_CODE_COVERAGE 351
|
||||
#define SPF_UNROLL 352
|
||||
#define SPF_MERGE 353
|
||||
#define SPF_COVER 354
|
||||
#define SPF_PROCESS_PRIVATE 355
|
||||
#define ACC_DECLARE 321
|
||||
#define BY 322
|
||||
#define IO_MODE 323
|
||||
#define CP_CREATE 324
|
||||
#define CP_LOAD 325
|
||||
#define CP_SAVE 326
|
||||
#define CP_WAIT 327
|
||||
#define FILES 328
|
||||
#define VARLIST 329
|
||||
#define STATUS 330
|
||||
#define EXITINTERVAL 331
|
||||
#define TEMPLATE_CREATE 332
|
||||
#define TEMPLATE_DELETE 333
|
||||
#define SPF_ANALYSIS 334
|
||||
#define SPF_PARALLEL 335
|
||||
#define SPF_TRANSFORM 336
|
||||
#define SPF_NOINLINE 337
|
||||
#define SPF_PARALLEL_REG 338
|
||||
#define SPF_END_PARALLEL_REG 339
|
||||
#define SPF_EXPAND 340
|
||||
#define SPF_FISSION 341
|
||||
#define SPF_SHRINK 342
|
||||
#define SPF_CHECKPOINT 343
|
||||
#define SPF_EXCEPT 344
|
||||
#define SPF_FILES_COUNT 345
|
||||
#define SPF_INTERVAL 346
|
||||
#define SPF_TIME 347
|
||||
#define SPF_ITER 348
|
||||
#define SPF_FLEXIBLE 349
|
||||
#define SPF_APPLY_REGION 350
|
||||
#define SPF_APPLY_FRAGMENT 351
|
||||
#define SPF_CODE_COVERAGE 352
|
||||
#define SPF_UNROLL 353
|
||||
#define SPF_MERGE 354
|
||||
#define SPF_COVER 355
|
||||
#define SPF_PROCESS_PRIVATE 356
|
||||
|
||||
@@ -318,6 +318,7 @@ ACC_INLOCAL
|
||||
ACC_CUDA_BLOCK
|
||||
ACC_ROUTINE
|
||||
ACC_TIE
|
||||
ACC_DECLARE
|
||||
BY
|
||||
IO_MODE
|
||||
CP_CREATE
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_SPF "2372"
|
||||
#define VERSION_SPF "2373"
|
||||
|
||||
Reference in New Issue
Block a user