Compare commits
3 Commits
54615e34d4
...
replace_io
| Author | SHA1 | Date | |
|---|---|---|---|
| 47e2b961e2 | |||
|
|
b95b336372 | ||
| f35d7cb4bd |
@@ -17,6 +17,14 @@ using std::pair;
|
||||
|
||||
#define DEBUG_TRACE 0
|
||||
|
||||
static bool hasArrayRef(SgExpression* ex)
|
||||
{
|
||||
if (ex)
|
||||
return isArrayRef(ex) || hasArrayRef(ex->lhs()) || hasArrayRef(ex->rhs());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool isArrayDeclaration(SgStatement* st)
|
||||
{
|
||||
return isSgDeclarationStatement(st) || isSgVarListDeclStmt(st) || isSgNestedVarListDeclStmt(st);
|
||||
@@ -201,11 +209,15 @@ static bool populateDistributedIoArrays(map<SgSymbol*, set<SgStatement*>>& array
|
||||
if (!arg)
|
||||
return false;
|
||||
|
||||
if (!isArrayRef(arg))
|
||||
if (hasArrayRef(arg))
|
||||
{
|
||||
if (isArrayRef(arg) && arg->lhs())
|
||||
need_replace = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
|
||||
if (arg->lhs())
|
||||
need_replace = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_SPF "2445"
|
||||
#define VERSION_SPF "2446"
|
||||
|
||||
Reference in New Issue
Block a user