This commit is contained in:
ALEXks
2023-11-21 21:19:10 +03:00
parent b8da3d5eb1
commit afdbfdac61
5 changed files with 26 additions and 16 deletions

View File

@@ -5358,21 +5358,6 @@ SgExpression * TranslateReductionToOpenmp(SgExpression *reduction_clause) /* Op
return OpenMPReductions; 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) SgStatement *checkInternal(SgSymbol *s)
{ {

View File

@@ -111,6 +111,20 @@ void SaveInterface(SgSymbol *s, SgStatement *interface)
GRAPHNODE(s)->st_interface = 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 findParameterNumber(SgSymbol *s, char *name)
{ {
int i; int i;

View File

@@ -2597,6 +2597,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
case INSERT_INCLUDES: case INSERT_INCLUDES:
case REMOVE_DVM_DIRS: case REMOVE_DVM_DIRS:
case REMOVE_DVM_DIRS_TO_COMMENTS: case REMOVE_DVM_DIRS_TO_COMMENTS:
case REMOVE_OMP_DIRS:
case PRIVATE_ARRAYS_EXPANSION: case PRIVATE_ARRAYS_EXPANSION:
case PRIVATE_ARRAYS_SHRINKING: case PRIVATE_ARRAYS_SHRINKING:
case UNROLL_LOOPS: case UNROLL_LOOPS:

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION_SPF "2238" #define VERSION_SPF "2240"

View File

@@ -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); 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 SPF_RemoveDvmDirectives(void*& context, int winHandler, short *options, short *projName, short *folderName, short *&output,
int *&outputSize, short *&outputMessage, int *&outputMessageSize) int *&outputSize, short *&outputMessage, int *&outputMessageSize)
{ {
@@ -2568,6 +2576,8 @@ const wstring Sapfor_RunTransformation(const char* transformName_c, const char*
if (whichRun == "SPF_CorrectCodeStylePass") if (whichRun == "SPF_CorrectCodeStylePass")
retCode = SPF_CorrectCodeStylePass(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize); 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") else if (whichRun == "SPF_RemoveDvmDirectives")
retCode = SPF_RemoveDvmDirectives(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize); retCode = SPF_RemoveDvmDirectives(context, winHandler, optSh, projSh, fold, output, outputSize, outputMessage, outputMessageSize);
else if (whichRun == "SPF_RemoveDvmDirectivesToComments") else if (whichRun == "SPF_RemoveDvmDirectivesToComments")