added module symbols initiazliation

This commit is contained in:
ALEXks
2025-03-11 15:24:36 +03:00
parent 817a910a4b
commit 1c851baa7e
4 changed files with 18 additions and 4 deletions

View File

@@ -35,6 +35,8 @@
#include "Utils/errors.h"
#include "Utils/SgUtils.h"
#include "Utils/module_utils.h"
#include "ProjectManipulation/ParseFiles.h"
#include "ProjectManipulation/PerfAnalyzer.h"
#include "ProjectManipulation/ConvertFiles.h"
@@ -57,7 +59,6 @@
#include "Predictor/PredictScheme.h"
#include "Predictor/PredictorModel.h"
#include "ExpressionTransform/expr_transform.h"
#include "SageAnalysisTool/depInterfaceExt.h"
#include "DvmhRegions/DvmhRegionInserter.h"
#include "DvmhRegions/LoopChecker.h"
@@ -495,8 +496,20 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
else if (curr_regime == CALL_GRAPH)
{
auto it = allFuncInfo.find(file_name);
if (it == allFuncInfo.end())
if (it == allFuncInfo.end()) {
functionAnalyzer(file, allFuncInfo, getObjectForFileFromMap(file_name, loopGraph), getObjectForFileFromMap(file_name, SPF_messages), fullIR);
it = allFuncInfo.find(file_name);
//init module symbols
if (it != allFuncInfo.end())
{
for (auto& func : it->second)
{
SgStatement* currF = func->funcPointer;
const auto& tmp = getModuleSymbols(currF);
}
}
}
}
else if (curr_regime == CALL_GRAPH2)
{

View File

@@ -307,7 +307,7 @@ static void getModuleSymbols(SgStatement* func, set<SgSymbol*>& symbs)
}
}
static const set<SgSymbol*>& getModuleSymbols(SgStatement *func)
const set<SgSymbol*>& getModuleSymbols(SgStatement *func)
{
if (symbolsForFunc.find(func) != symbolsForFunc.end())
return symbolsForFunc[func];

View File

@@ -1,5 +1,6 @@
#pragma once
const std::set<SgSymbol*>& getModuleSymbols(SgStatement* func);
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2395"
#define VERSION_SPF "2396"