Pass with output file added
This commit is contained in:
@@ -942,7 +942,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
|||||||
}
|
}
|
||||||
else if (curr_regime == SWAP_OPERATORS)
|
else if (curr_regime == SWAP_OPERATORS)
|
||||||
{
|
{
|
||||||
runSwapOperators(loopGraph, fullIR);
|
runSwapOperators(loopGraph, fullIR, countOfTransform);
|
||||||
}
|
}
|
||||||
else if (curr_regime == PRIVATE_REMOVING_ANALYSIS)
|
else if (curr_regime == PRIVATE_REMOVING_ANALYSIS)
|
||||||
{
|
{
|
||||||
@@ -1042,7 +1042,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
|||||||
PRIVATE_REMOVING,
|
PRIVATE_REMOVING,
|
||||||
PRIVATE_ARRAYS_EXPANSION,
|
PRIVATE_ARRAYS_EXPANSION,
|
||||||
PRIVATE_ARRAYS_SHRINKING,
|
PRIVATE_ARRAYS_SHRINKING,
|
||||||
REMOVE_DEAD_CODE };
|
REMOVE_DEAD_CODE,
|
||||||
|
SWAP_OPERATORS };
|
||||||
|
|
||||||
if ((countOfTransform == 0 || internalExit > 0) && applyFor.find(curr_regime) != applyFor.end())
|
if ((countOfTransform == 0 || internalExit > 0) && applyFor.find(curr_regime) != applyFor.end())
|
||||||
{
|
{
|
||||||
@@ -2335,6 +2336,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
|||||||
case INSERT_NO_DISTR_FLAGS_FROM_GUI:
|
case INSERT_NO_DISTR_FLAGS_FROM_GUI:
|
||||||
case PRIVATE_REMOVING:
|
case PRIVATE_REMOVING:
|
||||||
case RENAME_INLCUDES:
|
case RENAME_INLCUDES:
|
||||||
|
case SWAP_OPERATORS:
|
||||||
runAnalysis(*project, curr_regime, true, "", folderName);
|
runAnalysis(*project, curr_regime, true, "", folderName);
|
||||||
break;
|
break;
|
||||||
case INLINE_PROCEDURES:
|
case INLINE_PROCEDURES:
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
#include "swapOperators.h"
|
#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;
|
std::cout << "SWAP_OPERATORS Pass" << std::endl;
|
||||||
|
countOfTransform += 1;
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
@@ -3,4 +3,4 @@
|
|||||||
#include "../GraphLoop/graph_loops.h"
|
#include "../GraphLoop/graph_loops.h"
|
||||||
#include "../CFGraph/CFGraph.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