Compare commits
4 Commits
ff9dac4802
...
0c4f9465df
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c4f9465df | ||
| 9dbbe9fcdc | |||
| f5d2ecf549 | |||
| eee6f30f94 |
@@ -321,6 +321,12 @@ static set<SAPFOR::BasicBlock*> analyzeLoop(LoopGraph* loop, const set<SAPFOR::B
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentLoop.empty()) // can't find loop IR - loop unreachable!
|
||||||
|
{
|
||||||
|
__spf_print(1, "Unreachable loop on %s:%d\n", current_file->filename(), loop_operator->lineNumber());
|
||||||
|
return currentLoop;
|
||||||
|
}
|
||||||
|
|
||||||
if (!head_block)
|
if (!head_block)
|
||||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
|
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ static void getModuleSymbols(SgStatement* func, set<SgSymbol*>& symbs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set<SgSymbol*> getModuleSymbols(SgStatement *func)
|
const set<SgSymbol*>& getModuleSymbols(SgStatement *func)
|
||||||
{
|
{
|
||||||
auto it = symbolsForFunc.find(func->symbol()->identifier());
|
auto it = symbolsForFunc.find(func->symbol()->identifier());
|
||||||
if (it != symbolsForFunc.end())
|
if (it != symbolsForFunc.end())
|
||||||
@@ -345,7 +345,7 @@ set<SgSymbol*> getModuleSymbols(SgStatement *func)
|
|||||||
}
|
}
|
||||||
|
|
||||||
symbolsForFunc[func->symbol()->identifier()] = symbs;
|
symbolsForFunc[func->symbol()->identifier()] = symbs;
|
||||||
return symbs;
|
return symbolsForFunc[func->symbol()->identifier()];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void findSymbol(SgStatement* func, const string& varName, const string& locName,
|
static void findSymbol(SgStatement* func, const string& varName, const string& locName,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
std::string correctSymbolModuleName(const std::string& origFull);
|
std::string correctSymbolModuleName(const std::string& origFull);
|
||||||
std::set<SgSymbol*> getModuleSymbols(SgStatement* func);
|
const std::set<SgSymbol*>& getModuleSymbols(SgStatement* func);
|
||||||
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
|
void getModulesAndFunctions(SgFile* file, std::vector<SgStatement*>& modulesAndFunctions);
|
||||||
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
|
void findModulesInFile(SgFile* file, std::vector<SgStatement*>& modules);
|
||||||
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);
|
std::map<std::string, std::set<std::string>> createMapOfModuleUses(SgFile* file);
|
||||||
|
|||||||
Reference in New Issue
Block a user