merged master
This commit is contained in:
@@ -24,8 +24,6 @@
|
||||
#include "ParallelizationRegions/resolve_par_reg_conflicts.h"
|
||||
#include "ParallelizationRegions/expand_extract_reg.h"
|
||||
|
||||
#include "Transformations/replace_dist_arrays_in_io.h"
|
||||
|
||||
#include "Distribution/Distribution.h"
|
||||
#include "Distribution/GraphCSR.h"
|
||||
#include "Distribution/Arrays.h"
|
||||
@@ -55,7 +53,8 @@
|
||||
#include "VerificationCode/verifications.h"
|
||||
#include "Distribution/CreateDistributionDirs.h"
|
||||
#include "PrivateAnalyzer/private_analyzer.h"
|
||||
#include "ExpressionTransform/expr_transform.h"
|
||||
#include "PrivateAnalyzer/private_arrays_search.h"
|
||||
#include "expr_transform.h"
|
||||
|
||||
#include "Predictor/PredictScheme.h"
|
||||
#include "Predictor/PredictorModel.h"
|
||||
@@ -71,24 +70,26 @@
|
||||
#include "VisualizerCalls/SendMessage.h"
|
||||
#include "VisualizerCalls/BuildGraph.h"
|
||||
|
||||
#include "Transformations/enddo_loop_converter.h"
|
||||
#include "Transformations/loop_transform.h"
|
||||
#include "Transformations/array_assign_to_loop.h"
|
||||
#include "Transformations/private_arrays_resizing.h"
|
||||
#include "Transformations/loops_splitter.h"
|
||||
#include "Transformations/loops_combiner.h"
|
||||
#include "Transformations/loops_unrolling.h"
|
||||
#include "Transformations/uniq_call_chain_dup.h"
|
||||
#include "Transformations/checkpoints.h"
|
||||
#include "Transformations/swap_array_dims.h"
|
||||
#include "Transformations/function_purifying.h"
|
||||
#include "Transformations/private_removing.h"
|
||||
#include "Transformations/fix_common_blocks.h"
|
||||
#include "Transformations/convert_to_c.h"
|
||||
#include "Transformations/set_implicit_none.h"
|
||||
#include "Transformations/dead_code.h"
|
||||
#include "Transformations/ReplaceArraysInIO/replace_dist_arrays_in_io.h"
|
||||
#include "Transformations/LoopEndDoConverter/enddo_loop_converter.h"
|
||||
#include "Transformations/LoopNesting/loop_transform.h"
|
||||
#include "Transformations/VectorAssignToLoop/array_assign_to_loop.h"
|
||||
#include "Transformations/PrivateArrayResizing/private_arrays_resizing.h"
|
||||
#include "Transformations/LoopSplitting/loops_splitter.h"
|
||||
#include "Transformations/LoopCombining/loops_combiner.h"
|
||||
#include "Transformations/LoopUnrolling/loops_unrolling.h"
|
||||
#include "Transformations/FunctionDuplication/uniq_call_chain_dup.h"
|
||||
#include "Transformations/CheckPoints/checkpoints.h"
|
||||
#include "Transformations/ArrayDimsSwapping/swap_array_dims.h"
|
||||
#include "Transformations/FunctionPurifying/function_purifying.h"
|
||||
#include "Transformations/PrivateArrayRemoving/private_removing.h"
|
||||
#include "Transformations/GlobalVariables/fix_common_blocks.h"
|
||||
#include "Transformations/ConvertToC/convert_to_c.h"
|
||||
#include "Transformations/SetImplicitNone/set_implicit_none.h"
|
||||
#include "Transformations/DeadCodeRemoving/dead_code.h"
|
||||
#include "Transformations/RenameSymbols/rename_symbols.h"
|
||||
#include "Transformations/FunctionInlining/inliner.h"
|
||||
|
||||
#include "RenameSymbols/rename_symbols.h"
|
||||
#include "ProjectParameters/projectParameters.h"
|
||||
|
||||
#include "CFGraph/IR.h"
|
||||
@@ -98,8 +99,6 @@
|
||||
#include "CFGraph/live_variable_analysis.h"
|
||||
#include "CFGraph/private_variables_analysis.h"
|
||||
|
||||
#include "Inliner/inliner.h"
|
||||
|
||||
#include "dvm.h"
|
||||
#include "Sapfor.h"
|
||||
#include "Utils/PassManager.h"
|
||||
@@ -909,7 +908,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
else if (curr_regime == ADD_TEMPL_TO_USE_ONLY)
|
||||
fixUseOnlyStmt(file, parallelRegions);
|
||||
else if (curr_regime == GCOV_PARSER)
|
||||
parse_gcovfile(file, consoleMode == 1 ? file_name : "./visualiser_data/gcov/" + string(file_name), getObjectForFileFromMap(file_name, gCovInfo), keepFiles);
|
||||
parse_gcovfile(file, consoleMode == 1 ? file_name : string(VISUALIZER_DATA_PATH) + "/gcov/" + file_name, getObjectForFileFromMap(file_name, gCovInfo), keepFiles);
|
||||
else if(curr_regime == PRIVATE_ARRAYS_EXPANSION)
|
||||
{
|
||||
auto founded = loopGraph.find(file->filename());
|
||||
@@ -961,7 +960,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
vector<string> include_functions;
|
||||
|
||||
createInterTree(file, getObjectForFileFromMap(file_name, intervals), removeNestedIntervals, getObjectForFileFromMap(file_name, SPF_messages));
|
||||
assignCallsToFile(consoleMode == 1 ? file_name : "./visualiser_data/gcov/" + string(file_name), getObjectForFileFromMap(file_name, intervals));
|
||||
assignCallsToFile(consoleMode == 1 ? file_name : string(VISUALIZER_DATA_PATH) + "/gcov/" + file_name, getObjectForFileFromMap(file_name, intervals));
|
||||
removeNodes(intervals_threshold, getObjectForFileFromMap(file_name, intervals), include_functions);
|
||||
}
|
||||
else if (curr_regime == INSERT_INTER_TREE)
|
||||
@@ -1028,6 +1027,8 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
if(func->funcPointer->variant() != ENTRY_STAT)
|
||||
countOfTransform += removeDeadCode(func->funcPointer, allFuncInfo, commonBlocks);
|
||||
}
|
||||
else if (curr_regime == FIND_PRIVATE_ARRAYS)
|
||||
FindPrivateArrays(loopGraph, fullIR);
|
||||
else if (curr_regime == TEST_PASS)
|
||||
{
|
||||
//test pass
|
||||
@@ -1712,7 +1713,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
||||
}
|
||||
else if (curr_regime == GCOV_PARSER)
|
||||
{
|
||||
parseTimesDvmStatisticFile((consoleMode == 1) ? string("statistic.txt") : "./visualiser_data/statistic/" + string("statistic.txt"), intervals);
|
||||
parseTimesDvmStatisticFile((consoleMode == 1) ? string("statistic.txt") : string(VISUALIZER_DATA_PATH) + "/statistic/statistic.txt", intervals);
|
||||
|
||||
//fixed count, devide by value from PROG_HEDR
|
||||
SgStatement* mainUnit = findMainUnit(&project, SPF_messages);
|
||||
@@ -2662,32 +2663,12 @@ int main(int argc, char **argv)
|
||||
printStackTrace();
|
||||
printf("exception occurred\n");
|
||||
|
||||
json byFileArray = json::array();
|
||||
for (auto& byFile : SPF_messages)
|
||||
{
|
||||
json inFile;
|
||||
inFile["file"] = byFile.first;
|
||||
|
||||
json messages = json::array();
|
||||
for (auto& message : byFile.second)
|
||||
{
|
||||
message.print(byFile.first);
|
||||
messages.push_back(message.toJson());
|
||||
}
|
||||
inFile["messages"] = messages;
|
||||
byFileArray.push_back(inFile);
|
||||
}
|
||||
json allMessages;
|
||||
allMessages["allMessage"] = byFileArray;
|
||||
|
||||
FILE* outF = fopen("dump_messages.json", "w");
|
||||
fprintf(outF, "%s", allMessages.dump().c_str());
|
||||
fclose(outF);
|
||||
dumpMessages(true, SPF_messages, VISUALIZER_DATA_PATH);
|
||||
}
|
||||
dumpMessages(false, SPF_messages, VISUALIZER_DATA_PATH);
|
||||
|
||||
deleteAllAllocatedData(withDel);
|
||||
|
||||
|
||||
#if _WIN32 && _DEBUG
|
||||
if (leakMemDump)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user