Pass with output file added
This commit is contained in:
@@ -950,7 +950,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
}
|
||||
else if (curr_regime == SWAP_OPERATORS)
|
||||
{
|
||||
runSwapOperators(loopGraph, fullIR);
|
||||
runSwapOperators(loopGraph, fullIR, countOfTransform);
|
||||
}
|
||||
else if (curr_regime == PRIVATE_REMOVING_ANALYSIS)
|
||||
{
|
||||
@@ -1050,7 +1050,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
PRIVATE_REMOVING,
|
||||
PRIVATE_ARRAYS_EXPANSION,
|
||||
PRIVATE_ARRAYS_SHRINKING,
|
||||
REMOVE_DEAD_CODE };
|
||||
REMOVE_DEAD_CODE,
|
||||
SWAP_OPERATORS };
|
||||
|
||||
if ((countOfTransform == 0 || internalExit > 0) && applyFor.find(curr_regime) != applyFor.end())
|
||||
{
|
||||
@@ -2344,6 +2345,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
case INSERT_NO_DISTR_FLAGS_FROM_GUI:
|
||||
case PRIVATE_REMOVING:
|
||||
case RENAME_INLCUDES:
|
||||
case SWAP_OPERATORS:
|
||||
runAnalysis(*project, curr_regime, true, "", folderName);
|
||||
break;
|
||||
case INLINE_PROCEDURES:
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
#include "swapOperators.h"
|
||||
|
||||
|
||||
void runSwapOperators(std::map<std::string, std::vector<LoopGraph*>>& loopGraph, std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR)
|
||||
void runSwapOperators(std::map<std::string, std::vector<LoopGraph*>>& loopGraph, std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR, int& countOfTransform)
|
||||
{
|
||||
std::cout << "SWAP_OPERATORS Pass" << std::endl;
|
||||
countOfTransform += 1;
|
||||
return;
|
||||
};
|
||||
@@ -3,4 +3,4 @@
|
||||
#include "../GraphLoop/graph_loops.h"
|
||||
#include "../CFGraph/CFGraph.h"
|
||||
|
||||
void runSwapOperators(std::map<std::string, std::vector<LoopGraph*>>& loopGraph, std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR);
|
||||
void runSwapOperators(std::map<std::string, std::vector<LoopGraph*>>& loopGraph, std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR, int& countOfTransform);
|
||||
|
||||
Reference in New Issue
Block a user