added module symbols initiazliation
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_SPF "2395"
|
||||
#define VERSION_SPF "2396"
|
||||
|
||||
Reference in New Issue
Block a user