Compare commits
4 Commits
8b26666bfc
...
1b4a1b8ae4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b4a1b8ae4 | ||
|
|
c4f222fe34 | ||
|
|
020f2a1109 | ||
| e2b2a029e5 |
@@ -1316,7 +1316,9 @@ static SgStatement* processStatement(SgStatement* st, vector<IR_Block*>& blocks,
|
|||||||
{
|
{
|
||||||
SgStatement* body = select->defOption()->lexNext();
|
SgStatement* body = select->defOption()->lexNext();
|
||||||
|
|
||||||
while (body != lastSelect)
|
while (body != lastSelect &&
|
||||||
|
body->variant() != CASE_NODE &&
|
||||||
|
body->variant() != DEFAULT_NODE)
|
||||||
{
|
{
|
||||||
const int firstInstr = blocks.size();
|
const int firstInstr = blocks.size();
|
||||||
body = processLabel(processStatement(body, blocks, labels, func, commonVars, settings), firstInstr, blocks, labels);
|
body = processLabel(processStatement(body, blocks, labels, func, commonVars, settings), firstInstr, blocks, labels);
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ static void preventLoopsFromParallelizations(LoopGraph* loop, const set<DIST::Ar
|
|||||||
array_bounds += bounds_pair.second >= 0 ? to_string(bounds_pair.second) : "*";
|
array_bounds += bounds_pair.second >= 0 ? to_string(bounds_pair.second) : "*";
|
||||||
}
|
}
|
||||||
|
|
||||||
string array_ref = conflict_array->GetName() + "(" + array_bounds + ")";
|
string array_ref = conflict_array->GetShortName() + "(" + array_bounds + ")";
|
||||||
|
|
||||||
// add conflict message
|
// add conflict message
|
||||||
std::wstring bufE, bufR;
|
std::wstring bufE, bufR;
|
||||||
|
|||||||
@@ -2176,9 +2176,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
|
|||||||
else if (curr_regime == FIX_COMMON_BLOCKS)
|
else if (curr_regime == FIX_COMMON_BLOCKS)
|
||||||
fixCommonBlocks(allFuncInfo, commonBlocks, &project);
|
fixCommonBlocks(allFuncInfo, commonBlocks, &project);
|
||||||
else if (curr_regime == SELECT_ARRAY_DIM_CONF) {
|
else if (curr_regime == SELECT_ARRAY_DIM_CONF) {
|
||||||
map<string, vector<Messages>> localMessages;
|
SelectArrayConfForParallelization(&project, allFuncInfo, loopGraph, createdDirectives, SPF_messages, arrayLinksByFuncCalls, parallelRegions);
|
||||||
|
|
||||||
SelectArrayConfForParallelization(&project, allFuncInfo, loopGraph, createdDirectives, localMessages, arrayLinksByFuncCalls, parallelRegions);
|
|
||||||
removeRegionsWithoutDirs(createdDirectives, parallelRegions, allFuncInfo, SPF_messages);
|
removeRegionsWithoutDirs(createdDirectives, parallelRegions, allFuncInfo, SPF_messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2537,10 +2535,10 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
|||||||
}
|
}
|
||||||
|
|
||||||
FILE* templatesInfo = NULL;
|
FILE* templatesInfo = NULL;
|
||||||
if (consoleMode) {
|
if (consoleMode && withTemplateInfo) {
|
||||||
string file = (folderName) ? (folderName + string("/")) : "";
|
string file = (folderName) ? (folderName + string("/")) : "";
|
||||||
file += "templates_info_";
|
file += "templates_info_";
|
||||||
file += to_string(i);
|
file += to_string(i + 1);
|
||||||
file += ".txt";
|
file += ".txt";
|
||||||
|
|
||||||
templatesInfo = fopen(file.c_str(), "w");
|
templatesInfo = fopen(file.c_str(), "w");
|
||||||
@@ -2550,7 +2548,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
|||||||
|
|
||||||
for (int z = 0; z < parallelRegions.size(); ++z)
|
for (int z = 0; z < parallelRegions.size(); ++z)
|
||||||
{
|
{
|
||||||
if (consoleMode)
|
if (consoleMode && withTemplateInfo)
|
||||||
fprintf(templatesInfo, "FOR region %s\n", parallelRegions[z]->GetName().c_str());
|
fprintf(templatesInfo, "FOR region %s\n", parallelRegions[z]->GetName().c_str());
|
||||||
|
|
||||||
const DataDirective& dataDirectives = parallelRegions[z]->GetDataDir();
|
const DataDirective& dataDirectives = parallelRegions[z]->GetDataDir();
|
||||||
@@ -2561,10 +2559,10 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
|||||||
{
|
{
|
||||||
if (tmp[z1].first->IsTemplate())
|
if (tmp[z1].first->IsTemplate())
|
||||||
{
|
{
|
||||||
if (consoleMode)
|
if (consoleMode && withTemplateInfo)
|
||||||
{
|
{
|
||||||
SgExpression* rule = new SgExpression(EXPR_LIST);
|
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());
|
fprintf(templatesInfo, "%s(%s)\n", tmp[z1].first->GetShortName().c_str(), rule->unparse());
|
||||||
}
|
}
|
||||||
tmp[z1].first->ClearTemplateClones();
|
tmp[z1].first->ClearTemplateClones();
|
||||||
@@ -2575,7 +2573,7 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
|||||||
if (tmpFolder != "" && consoleMode)
|
if (tmpFolder != "" && consoleMode)
|
||||||
folderName = NULL;
|
folderName = NULL;
|
||||||
|
|
||||||
if (consoleMode)
|
if (consoleMode && withTemplateInfo)
|
||||||
fclose(templatesInfo);
|
fclose(templatesInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2760,7 +2758,9 @@ int main(int argc, char **argv)
|
|||||||
SPEED = 100;
|
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++;
|
i++;
|
||||||
int par = atoi(argv[i]);
|
int par = atoi(argv[i]);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ int debSh = 0; // shadow optimization debugging
|
|||||||
bool ignoreArrayDistributeState = false;
|
bool ignoreArrayDistributeState = false;
|
||||||
bool fullDepGraph = false;
|
bool fullDepGraph = false;
|
||||||
bool noLogo = false;
|
bool noLogo = false;
|
||||||
|
bool withTemplateInfo = false;
|
||||||
|
|
||||||
uint64_t currentAvailMemory = 0;
|
uint64_t currentAvailMemory = 0;
|
||||||
int QUALITY; // quality of conflicts search in graph
|
int QUALITY; // quality of conflicts search in graph
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ R151 = "Пустые области распараллеливания недо
|
|||||||
//3022
|
//3022
|
||||||
R171 = "Невозможно определить правила выравнивания для массива '%s'."
|
R171 = "Невозможно определить правила выравнивания для массива '%s'."
|
||||||
//3023
|
//3023
|
||||||
R202 = "Ссылка '%s' имеет размер отличный от оригинального массива размер"
|
R202 = "Ссылка '%s' имеет отличный от оригинального массива размер"
|
||||||
|
|
||||||
//4001
|
//4001
|
||||||
//---TODO ошибки из SAGE
|
//---TODO ошибки из SAGE
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2223"
|
#define VERSION_SPF "2225"
|
||||||
|
|||||||
Reference in New Issue
Block a user