From afdbfdac61b5baf2b11ca31b184eaf303a295c2f Mon Sep 17 00:00:00 2001 From: ALEXks Date: Tue, 21 Nov 2023 21:19:10 +0300 Subject: [PATCH] improved --- dvm/fdvm/trunk/fdvm/acc.cpp | 15 --------------- dvm/fdvm/trunk/fdvm/calls.cpp | 14 ++++++++++++++ sapfor/experts/Sapfor_2017/_src/Sapfor.cpp | 1 + sapfor/experts/Sapfor_2017/_src/Utils/version.h | 2 +- .../_src/VisualizerCalls/get_information.cpp | 10 ++++++++++ 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/dvm/fdvm/trunk/fdvm/acc.cpp b/dvm/fdvm/trunk/fdvm/acc.cpp index 557d1c1..81fbf61 100644 --- a/dvm/fdvm/trunk/fdvm/acc.cpp +++ b/dvm/fdvm/trunk/fdvm/acc.cpp @@ -5358,21 +5358,6 @@ SgExpression * TranslateReductionToOpenmp(SgExpression *reduction_clause) /* Op return OpenMPReductions; } -SgStatement *Interface(SgSymbol *s) -{ - SgStatement *interface = hasInterface(s); - if (!interface) - { - interface = getInterface(s); - if (isForCudaRegion()) - { - SaveInterface(s,interface); - MarkAsUserProcedure(s); - } - } - return interface; -} - /* SgStatement *checkInternal(SgSymbol *s) { diff --git a/dvm/fdvm/trunk/fdvm/calls.cpp b/dvm/fdvm/trunk/fdvm/calls.cpp index dff15b4..a7abbab 100644 --- a/dvm/fdvm/trunk/fdvm/calls.cpp +++ b/dvm/fdvm/trunk/fdvm/calls.cpp @@ -111,6 +111,20 @@ void SaveInterface(SgSymbol *s, SgStatement *interface) GRAPHNODE(s)->st_interface = interface; } +SgStatement *Interface(SgSymbol *s) +{ + SgStatement *interface = hasInterface(s); + if (!interface) + interface = getInterface(s); + + if (isForCudaRegion() && interface) + { + SaveInterface(s,interface); + MarkAsUserProcedure(s); + } + return interface; +} + int findParameterNumber(SgSymbol *s, char *name) { int i; diff --git a/sapfor/experts/Sapfor_2017/_src/Sapfor.cpp b/sapfor/experts/Sapfor_2017/_src/Sapfor.cpp index 95af46e..e3ed5d2 100644 --- a/sapfor/experts/Sapfor_2017/_src/Sapfor.cpp +++ b/sapfor/experts/Sapfor_2017/_src/Sapfor.cpp @@ -2597,6 +2597,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam case INSERT_INCLUDES: case REMOVE_DVM_DIRS: case REMOVE_DVM_DIRS_TO_COMMENTS: + case REMOVE_OMP_DIRS: case PRIVATE_ARRAYS_EXPANSION: case PRIVATE_ARRAYS_SHRINKING: case UNROLL_LOOPS: diff --git a/sapfor/experts/Sapfor_2017/_src/Utils/version.h b/sapfor/experts/Sapfor_2017/_src/Utils/version.h index a3eced5..f679328 100644 --- a/sapfor/experts/Sapfor_2017/_src/Utils/version.h +++ b/sapfor/experts/Sapfor_2017/_src/Utils/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_SPF "2238" +#define VERSION_SPF "2240" diff --git a/sapfor/experts/Sapfor_2017/_src/VisualizerCalls/get_information.cpp b/sapfor/experts/Sapfor_2017/_src/VisualizerCalls/get_information.cpp index 4fe78cb..e167f22 100644 --- a/sapfor/experts/Sapfor_2017/_src/VisualizerCalls/get_information.cpp +++ b/sapfor/experts/Sapfor_2017/_src/VisualizerCalls/get_information.cpp @@ -1831,6 +1831,14 @@ int SPF_CreateIntervalsTree(void*& context, int winHandler, short *options, shor return simpleTransformPass(INSERT_INTER_TREE, options, projName, folderName, output, outputSize, outputMessage, outputMessageSize); } +int SPF_RemoveOmpDirectives(void*& context, int winHandler, short* options, short* projName, short* folderName, short*& output, + int*& outputSize, short*& outputMessage, int*& outputMessageSize) +{ + MessageManager::clearCache(); + MessageManager::setWinHandler(winHandler); + return simpleTransformPass(REMOVE_OMP_DIRS, options, projName, folderName, output, outputSize, outputMessage, outputMessageSize); +} + int SPF_RemoveDvmDirectives(void*& context, int winHandler, short *options, short *projName, short *folderName, short *&output, int *&outputSize, short *&outputMessage, int *&outputMessageSize) { @@ -2568,6 +2576,8 @@ const wstring Sapfor_RunTransformation(const char* transformName_c, const char* if (whichRun == "SPF_CorrectCodeStylePass") retCode = SPF_CorrectCodeStylePass(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize); + else if (whichRun == "SPF_RemoveOmpDirectives") + retCode = SPF_RemoveOmpDirectives(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize); else if (whichRun == "SPF_RemoveDvmDirectives") retCode = SPF_RemoveDvmDirectives(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize); else if (whichRun == "SPF_RemoveDvmDirectivesToComments")