merged master

This commit is contained in:
ALEXks
2025-06-11 14:50:27 +03:00
151 changed files with 1341 additions and 505 deletions

View File

@@ -316,6 +316,8 @@ void InitPassesDependencies(map<passes, vector<passes>> &passDepsIn, set<passes>
list({ VERIFY_INCLUDES, CORRECT_VAR_DECL }) <= Pass(SET_IMPLICIT_NONE);
list({ CALL_GRAPH2, CALL_GRAPH, BUILD_IR, LOOP_GRAPH, LOOP_ANALYZER_DATA_DIST_S2 }) <= Pass(FIND_PRIVATE_ARRAYS);
passesIgnoreStateDone.insert({ CREATE_PARALLEL_DIRS, INSERT_PARALLEL_DIRS, INSERT_SHADOW_DIRS, EXTRACT_PARALLEL_DIRS,
EXTRACT_SHADOW_DIRS, CREATE_REMOTES, UNPARSE_FILE, REMOVE_AND_CALC_SHADOW,
REVERSE_CREATED_NESTED_LOOPS, PREDICT_SCHEME, CALCULATE_STATS_SCHEME, REVERT_SPF_DIRS, CLEAR_SPF_DIRS, TRANSFORM_SHADOW_IF_FULL,

View File

@@ -1,4 +1,4 @@
#include "../Utils/leak_detector.h"
#include "leak_detector.h"
#include <cstdio>
#include <cstdlib>
@@ -37,8 +37,8 @@
#include "../DirectiveProcessing/directive_parser.h"
#include "../Distribution/Distribution.h"
#include "../GraphCall/graph_calls.h"
#include "../GraphCall/graph_calls_func.h"
#include "graph_calls.h"
#include "graph_calls_func.h"
#include "../CreateInterTree/CreateInterTree.h"
#include "../Predictor/PredictScheme.h"
#include "../VisualizerCalls/get_information.h"

View File

@@ -3,7 +3,7 @@
#include "dvm.h"
#include "utils.h"
#include "../Distribution/Distribution.h"
#include "../GraphCall/graph_calls.h"
#include "graph_calls.h"
#include "../DynamicAnalysis/gcov_info.h"
#include "module_utils.h"

View File

@@ -7,7 +7,7 @@
#include "dvm.h"
#include "errors.h"
#include "utils.h"
#include "../GraphCall/graph_calls_func.h"
#include "graph_calls_func.h"
#include "module_utils.h"

View File

@@ -1,4 +1,4 @@
#include "../Utils/leak_detector.h"
#include "leak_detector.h"
#include <cstdio>
#include <cstdlib>
@@ -14,18 +14,16 @@
#include <map>
#include <set>
#include <utility>
#include <string>
#include <assert.h>
#include <locale>
#include <algorithm>
#include <thread>
#include <cstdint>
#include "utils.h"
#include "errors.h"
#include "utils.h"
#include "version.h"
#include "../GraphLoop/graph_loops.h"
#include "graph_loops.h"
#include "../Distribution/Array.h"
#include "../Distribution/Arrays.h"
#include "../DynamicAnalysis/gcov_info.h"
@@ -1737,4 +1735,38 @@ void copyStringToShort(short*& result, const string& resVal, bool withEnd)
if (withEnd)
result[resVal.size()] = (short)'\0';
}
void dumpMessages(bool inCatch, const map<string, vector<Messages>>& messages, const char *vis_path)
{
json byFileArray = json::array();
for (auto& byFile : messages)
{
json inFile;
inFile["file"] = byFile.first;
json messages = json::array();
for (auto& message : byFile.second)
{
if (inCatch)
message.print(byFile.first);
messages.push_back(message.toJson());
}
inFile["messages"] = messages;
byFileArray.push_back(inFile);
}
json allMessages;
allMessages["allMessages"] = byFileArray;
const string dump = allMessages.dump().c_str();
if (dump.size())
{
FILE* outF = fopen((string(vis_path) + "/error_messages.json").c_str(), "w");
if (outF)
{
fprintf(outF, "%s", dump.c_str());
fclose(outF);
}
}
}

View File

@@ -5,7 +5,9 @@
#include <string>
#include <cstdint>
struct Messages;
struct DataDirective;
namespace Distribution
{
class Array;
@@ -98,3 +100,17 @@ std::set<DIST::Array*> fillDistributedArraysD(const DataDirective& dataDirective
std::set<std::string> fillDistributedArrays(const DataDirective& dataDirectives, const std::map<DIST::Array*, std::tuple<int, std::string, std::string>>& tableOfUniqNamesByArray, const std::map<DIST::Array*, std::set<DIST::Array*>>& arrayLinksByFuncCalls, bool onlyCommon = false, bool shortName = false);
void copyStringToShort(short*& result, const std::string& resVal, bool withEnd = true);
void dumpMessages(bool inCatch, const std::map<std::string, std::vector<Messages>>& messages, const char* vis_path);
template<typename T>
inline T gcd(T a, T b)
{
while (a != b)
{
if (a > b)
a = a - b;
else
b = b - a;
}
return a;
}

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2423"
#define VERSION_SPF "2425"