fixed privates analysis
This commit is contained in:
@@ -7645,14 +7645,14 @@ SgExpression *CalculateArrayBound(SgExpression *edim, SgSymbol *ar, int flag_pri
|
|||||||
SgSubscriptExp *sbe;
|
SgSubscriptExp *sbe;
|
||||||
SgExpression *low;
|
SgExpression *low;
|
||||||
if (!edim && flag_private)
|
if (!edim && flag_private)
|
||||||
{
|
{
|
||||||
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
||||||
return (edim);
|
return (edim);
|
||||||
}
|
}
|
||||||
if ((sbe = isSgSubscriptExp(edim)) != NULL){ //DDOT
|
if ((sbe = isSgSubscriptExp(edim)) != NULL){ //DDOT
|
||||||
|
|
||||||
if (!sbe->ubound() && flag_private)
|
if (!sbe->ubound() && flag_private)
|
||||||
{
|
{
|
||||||
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
||||||
return(edim);
|
return(edim);
|
||||||
}
|
}
|
||||||
@@ -7675,8 +7675,8 @@ SgExpression *CalculateArrayBound(SgExpression *edim, SgSymbol *ar, int flag_pri
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
edim = Calculate(edim);
|
edim = Calculate(edim);
|
||||||
if (edim->variant() != INT_VAL && flag_private )
|
// if (edim->variant() != INT_VAL && flag_private )
|
||||||
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
// Error("Illegal array bound of private/reduction array %s", ar->identifier(), 442, dvm_parallel_dir);
|
||||||
return (edim);
|
return (edim);
|
||||||
}
|
}
|
||||||
@@ -11095,10 +11095,13 @@ SgExpression *BlockDimsProduct()
|
|||||||
{
|
{
|
||||||
return &(*new SgRecordRefExp(*s_blockdim, "x") * *new SgRecordRefExp(*s_blockdim, "y") * *new SgRecordRefExp(*s_blockdim, "z"));
|
return &(*new SgRecordRefExp(*s_blockdim, "x") * *new SgRecordRefExp(*s_blockdim, "y") * *new SgRecordRefExp(*s_blockdim, "z"));
|
||||||
}
|
}
|
||||||
|
|
||||||
SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type)
|
SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type)
|
||||||
{
|
{
|
||||||
SgExpression *e = isConstantBound(ar, i, 1);
|
SgExpression *e = isConstantBound(ar, i, 1);
|
||||||
|
if(e) return e;
|
||||||
|
if(type==0) //private array
|
||||||
|
e = new SgValueExp(1);
|
||||||
else // reduction array
|
else // reduction array
|
||||||
e = &(((SgExprListExp *)red_struct_list->lowBound_arg)->elem(i)->copy());
|
e = &(((SgExprListExp *)red_struct_list->lowBound_arg)->elem(i)->copy());
|
||||||
return e;
|
return e;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ static void addInListIfNeed(SgSymbol *tmp, int type, reduction_operation_list *t
|
|||||||
while (dimList)
|
while (dimList)
|
||||||
{
|
{
|
||||||
allArraySub.push(dimList->lhs());
|
allArraySub.push(dimList->lhs());
|
||||||
allArraySubConv.push(make_pair(LowerShiftForArrays(tmp, rank), UpperShiftForArrays(tmp, rank)));
|
allArraySubConv.push(make_pair(LowerShiftForArrays(tmp, rank, type), UpperShiftForArrays(tmp, rank)));
|
||||||
++rank;
|
++rank;
|
||||||
dimList = dimList->rhs();
|
dimList = dimList->rhs();
|
||||||
}
|
}
|
||||||
@@ -222,7 +222,7 @@ static void addInListIfNeed(SgSymbol *tmp, int type, reduction_operation_list *t
|
|||||||
bool ddot = false;
|
bool ddot = false;
|
||||||
if (ex->variant() == DDOT && ex->lhs() || IS_ALLOCATABLE(tmp))
|
if (ex->variant() == DDOT && ex->lhs() || IS_ALLOCATABLE(tmp))
|
||||||
ddot = true;
|
ddot = true;
|
||||||
t.correctExp.push_back(LowerShiftForArrays(tmp, rank));
|
t.correctExp.push_back(LowerShiftForArrays(tmp, rank, type));
|
||||||
|
|
||||||
// swap array's dimentionss
|
// swap array's dimentionss
|
||||||
if (inNewVars(tmp->identifier()))
|
if (inNewVars(tmp->identifier()))
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@ void RefInImplicitLoop(SgExpression *eim, int mode);
|
|||||||
void RefInImplicitLoop(SgExpression *eim, int mode);
|
void RefInImplicitLoop(SgExpression *eim, int mode);
|
||||||
SgSymbol *dvm000SymbolForHost(int host_dvm, SgStatement *hedr);
|
SgSymbol *dvm000SymbolForHost(int host_dvm, SgStatement *hedr);
|
||||||
SgExpression *Red_grid_index(SgSymbol *sind);
|
SgExpression *Red_grid_index(SgSymbol *sind);
|
||||||
SgExpression *BlockDimsProduct();
|
SgExpression *BlockDimsProduct();
|
||||||
SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type);
|
SgExpression *LowerShiftForArrays (SgSymbol *ar, int i, int type);
|
||||||
SgExpression *UpperShiftForArrays (SgSymbol *ar, int i);
|
SgExpression *UpperShiftForArrays (SgSymbol *ar, int i);
|
||||||
SgExpression *coefProd(int i, SgExpression *ec);
|
SgExpression *coefProd(int i, SgExpression *ec);
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2228"
|
#define VERSION_SPF "2229"
|
||||||
|
|||||||
Reference in New Issue
Block a user