fixed implicit
This commit is contained in:
@@ -51,12 +51,15 @@ static void FindAllVars(SgExpression* expr, set<SgSymbol*>& allVars, set<SgSymbo
|
|||||||
{
|
{
|
||||||
auto s = expr->symbol();
|
auto s = expr->symbol();
|
||||||
const string ident(s->identifier());
|
const string ident(s->identifier());
|
||||||
|
const int s_var = s->variant();
|
||||||
|
|
||||||
if (var == FUNC_CALL /*(s->attributes() & EXTERNAL_BIT)*/)
|
if (var == FUNC_CALL /*(s->attributes() & EXTERNAL_BIT)*/)
|
||||||
{
|
{
|
||||||
if (!IS_BY_USE(s) && ident.find("::") == string::npos /* && s->scope() == scope*/)
|
if (!IS_BY_USE(s) && ident.find("::") == string::npos /* && s->scope() == scope*/)
|
||||||
allVars.insert(s);
|
allVars.insert(s);
|
||||||
}
|
}
|
||||||
else
|
else if (s_var != CONSTRUCT_NAME ||
|
||||||
|
s_var == VARIABLE_NAME)
|
||||||
{
|
{
|
||||||
if (!IS_BY_USE(s) && ident.find("::") == string::npos && s->scope() == scope)
|
if (!IS_BY_USE(s) && ident.find("::") == string::npos && s->scope() == scope)
|
||||||
allVars.insert(s);
|
allVars.insert(s);
|
||||||
|
|||||||
13
sapfor/experts/Sapfor_2017/_src/Utils/module_utils.h
Normal file
13
sapfor/experts/Sapfor_2017/_src/Utils/module_utils.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
|
||||||
|
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
|
||||||
|
SgSymbol* getFromModule(const std::map<std::string, std::set<SgSymbol*>>& byUse, SgSymbol* orig, bool processAsModule = false);
|
||||||
|
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);
|
||||||
|
void fillModuleUse(SgFile* file, std::map<std::string, std::set<std::string>>& moduleUses, std::map<std::string, std::string>& moduleDecls);
|
||||||
|
void filterModuleUse(std::map<std::string, std::set<std::string>>& moduleUses, std::map<std::string, std::string>& moduleDecls);
|
||||||
|
void fillUsedModulesInFunction(SgStatement* st, std::vector<SgStatement*>& useStats);
|
||||||
|
std::string getNameByUse(SgStatement* place, const std::string& varName, const std::string& locName);
|
||||||
|
void fillUseStatement(SgStatement* st, std::set<std::string>& useMod, std::map<std::string, std::vector<std::pair<SgSymbol*, SgSymbol*>>>& modByUse, std::map<std::string, std::vector<std::pair<SgSymbol*, SgSymbol*>>>& modByUseOnly);
|
||||||
|
void fixUseOnlyStmt(SgFile* file, const std::vector<ParallelRegion*>& regs);
|
||||||
|
std::map<std::string, std::set<SgSymbol*>> moduleRefsByUseInFunction(SgStatement* stIn);
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2389"
|
#define VERSION_SPF "2390"
|
||||||
|
|||||||
Reference in New Issue
Block a user