fixed dead flag for functions
This commit is contained in:
@@ -17,6 +17,7 @@ struct graph_node {
|
||||
SgStatement *st_header;
|
||||
SgStatement *st_last;
|
||||
SgStatement *st_copy;
|
||||
SgStatement *st_copy_first;
|
||||
SgStatement *st_interface;
|
||||
SgSymbol *symb; //??? st_header->symbol()
|
||||
char *name;
|
||||
@@ -30,6 +31,7 @@ struct graph_node {
|
||||
int count; //counter of inline expansions or calls
|
||||
int is_routine;// has ROUTINE attribute - 1, else - 0
|
||||
int samenamed; // flag - there is samenamed symbol
|
||||
struct argument_numbers *arg_numbs;
|
||||
|
||||
#if __SPF
|
||||
graph_node() { addToCollection(__LINE__, __FILE__, this, 1); }
|
||||
@@ -67,4 +69,6 @@ struct edge_list {
|
||||
edge_list() { addToCollection(__LINE__, __FILE__, this, 1); }
|
||||
~edge_list() { removeFromCollection(this); }
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -205,6 +205,11 @@ struct local_part_list {
|
||||
SgSymbol *local_part;
|
||||
local_part_list *next;
|
||||
}; /*ACC*/
|
||||
|
||||
struct argument_numbers { // numbers of dummy arguments that correspond to a private array when calling a procedure
|
||||
argument_numbers *next;
|
||||
int number;
|
||||
}; /*ACC*/
|
||||
|
||||
const int ROOT = 1;
|
||||
const int NODE = 2;
|
||||
@@ -265,6 +270,9 @@ const int L_BOUNDS = 1054; /*ACC*/
|
||||
const int L_BOUNDS = 1054; /*ACC*/
|
||||
const int DIM_SIZES = 1055; /*ACC*/
|
||||
const int PRIVATE_ARRAY = 1056; /*ACC*/
|
||||
const int PRIVATE_POINTER = 1057; /*ACC*/
|
||||
const int FUNCTION_AR_DUMMY = 1058; /*ACC*/
|
||||
const int DUMMY_PRIVATE_AR = 1059; /*ACC*/
|
||||
const int NULL_SUBSCRIPTS = 1060; /*ACC*/
|
||||
|
||||
const int MAX_LOOP_LEVEL = 20; // 7 - maximal number of loops in parallel loop nest
|
||||
@@ -599,6 +607,7 @@ EXTERN int in_checksection,undefined_Tcuda, cuda_functions; /*ACC*/
|
||||
EXTERN int in_checksection,undefined_Tcuda, cuda_functions; /*ACC*/
|
||||
EXTERN symb_list *RGname_list; /*ACC*/
|
||||
EXTERN int parloop_by_handler; //set to 1 by option -Opl and /*ACC*/
|
||||
// to 2 by option -Opl2
|
||||
EXTERN SgSymbol *private_array_class;
|
||||
//---------------------------------------------------------------------
|
||||
/* dvm.cpp */
|
||||
@@ -635,7 +644,8 @@ int Rank(SgSymbol *s);
|
||||
int Rank(SgSymbol *s);
|
||||
SgExpression *dvm_array_ref();
|
||||
SgExpression *dvm_ref(int n);
|
||||
int DeleteDArFromList(SgStatement *stmt);
|
||||
int DeleteDArFromList(SgStatement *stmt);
|
||||
//void ChangeArg_DistArrayRef(SgExpression *e);
|
||||
void ChangeArg_DistArrayRef(SgExpression *ele, SgSymbol *fsym, int i);
|
||||
void ChangeDistArrayRef(SgExpression *e);
|
||||
void ChangeDistArrayRef_Left(SgExpression *e);
|
||||
@@ -1436,6 +1446,7 @@ void ExtractCopy(SgExpression *elist);
|
||||
void ExtractCopy(SgExpression *elist);
|
||||
void CleanAllocatedList();
|
||||
SgStatement *CreateIndirectDistributionProcedure(SgSymbol *sProc,symb_list *paramList,symb_list *dummy_index_list,SgExpression *derived_elem_list,int flag);
|
||||
SgExpression *FirstArrayElementSubscriptsForHandler(SgSymbol *ar);
|
||||
SgExpression *FirstArrayElementSubscriptsOfPrivateArray(SgSymbol *s);
|
||||
SgSymbol *HeaderSymbolForHandler(SgSymbol *ar);
|
||||
void TestRoutineAttribute(SgSymbol *s, SgStatement *routine_interface);
|
||||
@@ -1453,8 +1464,12 @@ SgExpression *CreatePrivateDummyList();
|
||||
SgExpression *CreatePrivateDummyList();
|
||||
char *PointerNameForPrivateArray(SgSymbol *symb);
|
||||
void GetMemoryForPrivateArrays(SgSymbol *private_first, SgSymbol *s_loop_ref, int nump, SgStatement *st_end, SgStatement *st_hedr, SgExpression *e_totalThreads);
|
||||
SgSymbol *LocRedVariableSymbolInKernel(reduction_operation_list *rsl);
|
||||
int PrivateArrayClassUse(SgExpression *e_all_private_size);
|
||||
SgExpression *CalculateSizeOfPrivateArraysInBytes();
|
||||
SgExpression *ElementOfPrivateList(SgSymbol *ar);
|
||||
void testDeclareDirectives(SgStatement *first_dvm_exec);
|
||||
void ACC_DECLARE_Directive(SgStatement *stmt);
|
||||
SgStatement *makeClassObjectDeclaration(SgSymbol *s, SgSymbol *sp, SgStatement *header_st, SgType *idxType, SgExpression *dim_list, int flag_true);
|
||||
|
||||
/* acc_analyzer.cpp */
|
||||
@@ -1563,6 +1578,7 @@ SgStatement *else_dir();
|
||||
SgStatement *else_dir();
|
||||
SgExpression *CalculateArrayBound(SgExpression *edim,SgSymbol *ar, int flag_private);
|
||||
void ReplaceArrayBoundsInDeclaration(SgExpression *e);
|
||||
int ExplicitShape(SgExpression *eShape);
|
||||
int AssumedShape(SgExpression *eShape);
|
||||
SgSymbol *ArraySymbolInHostHandler(SgSymbol *ar,SgStatement *scope);
|
||||
SgSymbol *DeclareSymbolInHostHandler(SgSymbol *var, SgStatement *st_hedr, SgSymbol *loc_var);
|
||||
@@ -2118,6 +2134,7 @@ void Translate_Fortran_To_C(SgStatement *stat, SgStatement *last, int countOfCop
|
||||
void Translate_Fortran_To_C(SgStatement *stat, SgStatement *last, int countOfCopy, SgStatement *st_header);
|
||||
SgStatement* Translate_Fortran_To_C(SgStatement* Stmt, bool isSapforConv = false);
|
||||
SgSymbol* createNewFunctionSymbol(const char *name);
|
||||
void swapDimentionsInprivateList(void);
|
||||
void swapDimentionsInprivateList(SgExpression *pList);
|
||||
void createNewFCall(SgExpression*, SgExpression*&, const char*, int);
|
||||
SgFunctionCallExp* createNewFCall(const char *name);
|
||||
@@ -2181,12 +2198,13 @@ void Call_Site (SgSymbol *s, int inlined, SgStatement *stat, SgExpression *e);
|
||||
void Call_Site (SgSymbol *s, int inlined, SgStatement *stat, SgExpression *e);
|
||||
SgSymbol * GetProcedureHeaderSymbol(SgSymbol *s);
|
||||
void MarkAsRoutine(SgSymbol *s);
|
||||
void MarkAsCalled(SgSymbol *s);
|
||||
void MarkPrivateArgumentsOfRoutine(SgSymbol *s, SgExpression *private_args);
|
||||
void MarkAsUserProcedure(SgSymbol *s);
|
||||
void MarkAsExternalProcedure(SgSymbol *s);
|
||||
void MakeFunctionCopy(SgSymbol *s);
|
||||
SgStatement *HeaderStatement(SgSymbol *s);
|
||||
void InsertCalledProcedureCopies();
|
||||
void InsertCalledProcedureCopies();
|
||||
SgStatement *InsertProcedureCopy(SgStatement *st_header, SgSymbol *sproc, int is_routine, argument_numbers *arg_numbs, SgStatement *after);
|
||||
int FromOtherFile(SgSymbol *s);
|
||||
int findParameterNumber(SgSymbol *s, char *name);
|
||||
@@ -2197,7 +2215,9 @@ int IsRecursiveProcedure(SgSymbol *s);
|
||||
int IsRecursiveProcedure(SgSymbol *s);
|
||||
int IsNoBodyProcedure(SgSymbol *s);
|
||||
int isUserFunction(SgSymbol *s);
|
||||
int IsInternalProcedure(SgSymbol *s);
|
||||
int IsInternalProcedure(SgSymbol *s);
|
||||
int isArrayParameter(SgSymbol *s, int i);
|
||||
int isArrayParameterWithAssumedShape(SgSymbol *s, int i);
|
||||
SgExpression *FunctionDummyList(SgSymbol *s, SgStatement *st_header, argument_numbers *arg_numbs);
|
||||
char *FunctionResultIdentifier(SgSymbol *sfun);
|
||||
SgSymbol *isSameNameInProcedure(char *name, SgSymbol *sfun);
|
||||
@@ -2212,14 +2232,15 @@ SgStatement *FunctionPrototype(SgSymbol *sf);
|
||||
SgStatement *FunctionPrototype(SgSymbol *sf);
|
||||
bool CreateIntefacePrototype(SgStatement *header);
|
||||
SgStatement *hasInterface(SgSymbol *s);
|
||||
void SaveInterface(SgSymbol *s, SgStatement *interface);
|
||||
void SaveInterface(SgSymbol *s, SgStatement *interface);
|
||||
SgStatement *TranslateProcedureHeader_To_C(SgStatement *new_header, argument_numbers *arg_numbs);
|
||||
SgStatement *getInterface(SgSymbol *s);
|
||||
SgStatement *getGenericInterface(SgSymbol *s, SgExpression *arg_list);
|
||||
int CompareKind(SgType* type_arg, SgType* type_dummy);
|
||||
SgExpression* TypeKindExpr(SgType* t);
|
||||
SgFunctionSymb *SymbolForIntrinsicFunction(const char *name, int i, SgType *tp, SgStatement *func);
|
||||
|
||||
SgFunctionSymb *SymbolForIntrinsicFunction(const char *name, int i, SgType *tp, SgStatement *func);
|
||||
void addArgumentNumber(int i, SgSymbol *s);
|
||||
argument_numbers *GetNextNumberList(argument_numbers *source, argument_numbers *list);
|
||||
int isPrivateArrayDummy(SgSymbol *s);
|
||||
//-----------------------------------------------------------------------
|
||||
extern "C" char* funparse_bfnd(...);
|
||||
@@ -2267,7 +2288,7 @@ void ConvertLoopWithLabelToEnddoLoop (SgStatement *stat); /*OMP*/
|
||||
// options on FDVM converter
|
||||
enum OPTIONS {
|
||||
AUTO_TFM = 0, ONE_THREAD, SPEED_TEST_L0, SPEED_TEST_L1, GPU_O0, GPU_O1, RTC, C_CUDA, OPT_EXP_COMP,
|
||||
O_HOST, NO_CUDA, NO_BL_INFO, LOOP_ANALYSIS, PRIVATE_ANALYSIS, IO_RTS, READ_ALL, NO_REMOTE, NO_PURE_FUNC,
|
||||
O_HOST, NO_CUDA, NO_BL_INFO, LOOP_ANALYSIS, PRIVATE_ANALYSIS, IO_RTS, READ_ALL, NO_REMOTE, NO_PURE_FUNC,
|
||||
GPU_IRR_ACC, O_PL, O_PL2, BIG_PRIVATES, NUM_OPT};
|
||||
// ONE_THREAD - compile one thread CUDA-kernels only for across (TODO for all CUDA-kernels)
|
||||
// SPEED_TEST_L0, SPEED_TEST_L1 - debug options for speed testof CUDA-kernels for across
|
||||
|
||||
Reference in New Issue
Block a user