added REMOVE_SPF pass
This commit is contained in:
@@ -343,11 +343,13 @@ static string unparseProjectIfNeed(SgFile* file, const int curr_regime, const bo
|
||||
// copy includes that have not changed
|
||||
if (folderName != NULL)
|
||||
{
|
||||
int removeDvmDirs = 0;
|
||||
int removeSpfDirs = 0;
|
||||
if (curr_regime == REMOVE_DVM_DIRS)
|
||||
removeDvmDirs = 1;
|
||||
removeSpfDirs = 1;
|
||||
else if (curr_regime == REMOVE_DVM_DIRS_TO_COMMENTS)
|
||||
removeDvmDirs = 2;
|
||||
removeSpfDirs = 2;
|
||||
else if (curr_regime == REMOVE_SPF_DIRS)
|
||||
removeSpfDirs = 3;
|
||||
|
||||
|
||||
set<string> allIncludeFilesFiltr;
|
||||
@@ -362,7 +364,7 @@ static string unparseProjectIfNeed(SgFile* file, const int curr_regime, const bo
|
||||
}
|
||||
allIncludeFiles = allIncludeFilesFiltr;
|
||||
|
||||
copyIncludes(allIncludeFiles, commentsToInclude, newCopyDeclToIncl, folderName, keepSpfDirs, out_free_form == 1, (curr_regime == RENAME_INLCUDES), removeDvmDirs);
|
||||
copyIncludes(allIncludeFiles, commentsToInclude, newCopyDeclToIncl, folderName, keepSpfDirs, out_free_form == 1, (curr_regime == RENAME_INLCUDES), removeSpfDirs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -741,8 +743,12 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
}
|
||||
else if (curr_regime == LOOP_DATA_DEPENDENCIES)
|
||||
doDependenceAnalysisOnTheFullFile(file, 1, 1, 1);
|
||||
else if (curr_regime == REMOVE_DVM_DIRS || curr_regime == REMOVE_DVM_DIRS_TO_COMMENTS)
|
||||
removeDvmDirectives(file, curr_regime == REMOVE_DVM_DIRS_TO_COMMENTS);
|
||||
else if (curr_regime == REMOVE_DVM_DIRS || curr_regime == REMOVE_DVM_DIRS_TO_COMMENTS || curr_regime == REMOVE_SPF_DIRS) {
|
||||
bool removeDvm = (curr_regime == REMOVE_DVM_DIRS || curr_regime == REMOVE_DVM_DIRS);
|
||||
bool removeSpf = (curr_regime == REMOVE_SPF_DIRS);
|
||||
bool toComment = (curr_regime == REMOVE_DVM_DIRS_TO_COMMENTS);
|
||||
removeDvmSpfDirectives(file, removeDvm, removeSpf, toComment);
|
||||
}
|
||||
else if (curr_regime == REMOVE_DVM_INTERVALS)
|
||||
{
|
||||
vector<SgStatement*> toDel;
|
||||
@@ -2309,6 +2315,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_SPF_DIRS:
|
||||
case PRIVATE_ARRAYS_EXPANSION:
|
||||
case PRIVATE_ARRAYS_SHRINKING:
|
||||
case UNROLL_LOOPS:
|
||||
|
||||
Reference in New Issue
Block a user