STMT_STR: fix dependencies order, handle STMT_STR while replacing
This commit is contained in:
@@ -136,7 +136,9 @@ static void replaceArrayRec(SgSymbol* arr, SgSymbol* replace_by, SgExpression* e
|
||||
if (!exp)
|
||||
return;
|
||||
|
||||
if (exp->symbol() && exp->symbol()->identifier() && strcmp(exp->symbol()->identifier(), arr->identifier()) == 0)
|
||||
if (exp->variant() != STMT_STR && exp->symbol() &&
|
||||
exp->symbol()->identifier() &&
|
||||
strcmp(exp->symbol()->identifier(), arr->identifier()) == 0)
|
||||
{
|
||||
has_read |= from_read;
|
||||
has_write |= from_write;
|
||||
|
||||
@@ -257,7 +257,7 @@ void InitPassesDependencies(map<passes, vector<passes>> &passDepsIn, set<passes>
|
||||
|
||||
list({ REVERT_SUBST_EXPR_RD, CONVERT_LOOP_TO_ASSIGN }) <= Pass(RESOLVE_PAR_REGIONS);
|
||||
|
||||
list({ REVERT_SUBST_EXPR_RD, CONVERT_LOOP_TO_ASSIGN, FILL_PAR_REGIONS}) <= Pass(REMOVE_DIST_ARRAYS_FROM_IO);
|
||||
list({ FILL_PAR_REGIONS, REVERT_SUBST_EXPR_RD, CONVERT_LOOP_TO_ASSIGN}) <= Pass(REMOVE_DIST_ARRAYS_FROM_IO);
|
||||
|
||||
Pass(REVERT_SUBST_EXPR_RD) <= Pass(EXPAND_EXTRACT_PAR_REGION);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user