fixed -tinfo option
This commit is contained in:
@@ -2537,10 +2537,10 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
}
|
||||
|
||||
FILE* templatesInfo = NULL;
|
||||
if (consoleMode) {
|
||||
if (consoleMode && withTemplateInfo) {
|
||||
string file = (folderName) ? (folderName + string("/")) : "";
|
||||
file += "templates_info_";
|
||||
file += to_string(i);
|
||||
file += to_string(i + 1);
|
||||
file += ".txt";
|
||||
|
||||
templatesInfo = fopen(file.c_str(), "w");
|
||||
@@ -2550,7 +2550,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
|
||||
for (int z = 0; z < parallelRegions.size(); ++z)
|
||||
{
|
||||
if (consoleMode)
|
||||
if (consoleMode && withTemplateInfo)
|
||||
fprintf(templatesInfo, "FOR region %s\n", parallelRegions[z]->GetName().c_str());
|
||||
|
||||
const DataDirective& dataDirectives = parallelRegions[z]->GetDataDir();
|
||||
@@ -2561,10 +2561,10 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
{
|
||||
if (tmp[z1].first->IsTemplate())
|
||||
{
|
||||
if (consoleMode)
|
||||
if (consoleMode && withTemplateInfo)
|
||||
{
|
||||
SgExpression* rule = new SgExpression(EXPR_LIST);
|
||||
tmp[z1].second[currentVariants[z1][z]].GenRule(new File(current_file), new Expression(rule), tmp[z1].first->GetNewTemplateDimsOrder());
|
||||
tmp[z1].second[currentVariant[z1]].GenRule(new File(current_file), new Expression(rule), tmp[z1].first->GetNewTemplateDimsOrder());
|
||||
fprintf(templatesInfo, "%s(%s)\n", tmp[z1].first->GetShortName().c_str(), rule->unparse());
|
||||
}
|
||||
tmp[z1].first->ClearTemplateClones();
|
||||
@@ -2575,7 +2575,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
if (tmpFolder != "" && consoleMode)
|
||||
folderName = NULL;
|
||||
|
||||
if (consoleMode)
|
||||
if (consoleMode && withTemplateInfo)
|
||||
fclose(templatesInfo);
|
||||
}
|
||||
}
|
||||
@@ -2760,7 +2760,9 @@ int main(int argc, char **argv)
|
||||
SPEED = 100;
|
||||
}
|
||||
}
|
||||
else if (curr_arg[1] == 't') // deprecated
|
||||
else if (string(curr_arg) == "-tinfo")
|
||||
withTemplateInfo = true;
|
||||
else if (string(curr_arg) == "-t") // deprecated
|
||||
{
|
||||
i++;
|
||||
int par = atoi(argv[i]);
|
||||
|
||||
@@ -45,6 +45,7 @@ int debSh = 0; // shadow optimization debugging
|
||||
bool ignoreArrayDistributeState = false;
|
||||
bool fullDepGraph = false;
|
||||
bool noLogo = false;
|
||||
bool withTemplateInfo = false;
|
||||
|
||||
uint64_t currentAvailMemory = 0;
|
||||
int QUALITY; // quality of conflicts search in graph
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_SPF "2223"
|
||||
#define VERSION_SPF "2224"
|
||||
|
||||
Reference in New Issue
Block a user