added new options
This commit is contained in:
@@ -3381,7 +3381,7 @@ void insertSpfAnalysisBeforeParalleLoops(const vector<LoopGraph*> &loops)
|
||||
{
|
||||
loop->loop->addAttribute(SPF_ANALYSIS_DIR, spfStat, sizeof(SgStatement));
|
||||
//uncomment it to debug private analysis
|
||||
//loop->loop->insertStmtBefore(*spfStat);
|
||||
//loop->loop->insertStmtBefore(*spfStat, *loop->loop->controlParent());
|
||||
}
|
||||
insertSpfAnalysisBeforeParalleLoops(loop->children);
|
||||
}
|
||||
|
||||
@@ -2075,7 +2075,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
|
||||
if (project == NULL && curr_regime != PARSE_FILES)
|
||||
{
|
||||
project = createProject(proj_name, parallelRegions, subs_parallelRegions, hiddenData, filesNameWithoutExt, moduleUsesByFile, moduleDecls, exctactedModuleStats);
|
||||
project = createProject(proj_name, parallelRegions, subs_parallelRegions, hiddenData, filesNameWithoutExt, moduleUsesByFile, moduleDecls, exctactedModuleStats, printSymbTable);
|
||||
//first check correctness
|
||||
runPass(VERIFY_FUNC_DECL, proj_name, folderName);
|
||||
}
|
||||
@@ -2540,7 +2540,7 @@ int main(int argc, char **argv)
|
||||
pppaAnalyzer(argc - i, argv + i);
|
||||
else if (string(curr_arg) == "-fdvm")
|
||||
convertFiles(argc - i, argv + i);
|
||||
else if (string(curr_arg) == "-mpi") {
|
||||
else if (string(curr_arg) == "-mpi" || string(curr_arg) == "-shared") {
|
||||
sharedMemoryParallelization = 1;
|
||||
ignoreArrayDistributeState = true;
|
||||
}
|
||||
@@ -2590,6 +2590,8 @@ int main(int argc, char **argv)
|
||||
noLogo = true;
|
||||
else if (string(curr_arg) == "-includeAll")
|
||||
inlcudeAllFiles = true;
|
||||
else if (string(curr_arg) == "-printSymbTable")
|
||||
printSymbTable = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -48,6 +48,7 @@ bool noLogo = false;
|
||||
bool withTemplateInfo = false;
|
||||
bool inlcudeAllFiles = false; // for pass INSERT_INLCUDES
|
||||
bool runAsClient = false; // run console project as client for Visualizer
|
||||
bool printSymbTable = false;
|
||||
|
||||
uint64_t currentAvailMemory = 0;
|
||||
int QUALITY; // quality of conflicts search in graph
|
||||
|
||||
@@ -2379,7 +2379,7 @@ void printSymbolTable(SgFile *file, string filter, const set<int>& vars)
|
||||
if (need)
|
||||
{
|
||||
int line = s->scope() ? s->scope()->lineNumber() : -1;
|
||||
printf("[%d] '%s' type %d ('%s'), location %d line, variant %d, %0lx\n", s->id(), s->identifier(), t ? t->variant() : -1, t ? tag[t->variant()] : "", line, s->variant(), s->thesymb);
|
||||
printf("[%d] '%s' type %d ('%s'), location %d line, variant %d, addr %p\n", s->id(), s->identifier(), t ? t->variant() : -1, t ? tag[t->variant()] : "", line, s->variant(), s->thesymb);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3142,7 +3142,8 @@ SgProject* createProject(const char* proj_name,
|
||||
map<string, int>& filesNameWithoutExt,
|
||||
map<string, set<string>>& moduleUsesByFile,
|
||||
map<string, string>& moduleDecls,
|
||||
map<string, map<SgStatement*, vector<SgStatement*>>>& exctactedModuleStats)
|
||||
map<string, map<SgStatement*, vector<SgStatement*>>>& exctactedModuleStats,
|
||||
bool printSymbTable)
|
||||
{
|
||||
Statement::setSapforRegime();
|
||||
Statement::deactiveConsistentchecker();
|
||||
@@ -3150,7 +3151,14 @@ SgProject* createProject(const char* proj_name,
|
||||
SgProject* project = new SgProject(proj_name);
|
||||
addNumberOfFileToAttribute(project);
|
||||
|
||||
//printSymbolTable(&project->file(0), "");
|
||||
if (printSymbTable) {
|
||||
for (int z = 0; z < project->numberOfFiles(); ++z) {
|
||||
SgFile* file = &(project->file(z));
|
||||
printf("===== TABLE FOR FILE %s\n", file->filename());
|
||||
printSymbolTable(file, "");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
parallelRegions.push_back(new ParallelRegion(0, "DEFAULT"));
|
||||
subs_parallelRegions.push_back(new ParallelRegion(0, "DEFAULT"));
|
||||
|
||||
@@ -90,7 +90,7 @@ void getVariables(SgExpression* ex, std::set<SgSymbol*>& variables, const std::s
|
||||
template<typename T>
|
||||
std::set<T> getAllVariables(SgStatement* stFrom, SgStatement* stTo, const std::set<int>& variants);
|
||||
|
||||
SgProject* createProject(const char* proj_name, std::vector<ParallelRegion*>& parallelRegions, std::vector<ParallelRegion*>& subs_parallelRegions, std::map<std::string, std::vector<SgStatement*>>& hiddenData, std::map<std::string, int>& filesNameWithoutExt, std::map<std::string, std::set<std::string>>& moduleUsesByFile, std::map<std::string, std::string>& moduleDecls, std::map<std::string, std::map<SgStatement*, std::vector<SgStatement*>>>& exctactedModuleStats);
|
||||
SgProject* createProject(const char* proj_name, std::vector<ParallelRegion*>& parallelRegions, std::vector<ParallelRegion*>& subs_parallelRegions, std::map<std::string, std::vector<SgStatement*>>& hiddenData, std::map<std::string, int>& filesNameWithoutExt, std::map<std::string, std::set<std::string>>& moduleUsesByFile, std::map<std::string, std::string>& moduleDecls, std::map<std::string, std::map<SgStatement*, std::vector<SgStatement*>>>& exctactedModuleStats, bool printSymbTable);
|
||||
|
||||
bool isArrayType(SgType* type);
|
||||
bool isArrayRef(SgExpression* ex);
|
||||
|
||||
@@ -159,7 +159,8 @@ void printHelp(const char **passNames, const int lastPass)
|
||||
printf(" -passInfo print passes information\n");
|
||||
printf(" -dumpIR print IR information (works only with BUILD_IR pass)\n");
|
||||
printf(" -ignoreDistArray ingnore array distribution information (set to all arrays no distribution state\n");
|
||||
printf(" -mpi shared memory and mpi programs parallelization\n");
|
||||
printf(" -shared shared memory and mpi programs parallelization\n");
|
||||
printf(" -printSymbTable print all symbol tables of project\n");
|
||||
printf("\n");
|
||||
|
||||
printf(" -F <folderName> output to folder\n");
|
||||
|
||||
Reference in New Issue
Block a user