Source

...

Target

Commits (63)
Showing with 241 additions and 223 deletions
+241 -223
......@@ -575,67 +575,72 @@ ${PROJECT_BINARY_DIR}/src/build.c
# XXX (artem): For the time being we exclude the files that do not yet adhere
# with -Wconversion.
SET_SOURCE_FILES_PROPERTIES(
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/algebraic_wlfi.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/isl_utilities.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/ivexpropagation.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/loop_and_cond_scalarization_in.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/loop_and_cond_scalarization_out.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/pad_info.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/polyhedral_wlf.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWithloopFolding.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWLF.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWLI.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/WithloopFusion.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/wlswithloopification.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/compile.c
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/algebraic_wlfi.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/isl_utilities.c #isl_val_get_num_si is long, FUNDEF_LOOPCOUNT int
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/ivexpropagation.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/loop_and_cond_scalarization_in.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/loop_and_cond_scalarization_out.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/pad_info.c #SHPSEG_SHAPE
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/polyhedral_wlf.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWithloopFolding.c #SHgetExtent, UnrLen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWLF.c #SHgetUnrlen for intern_gen->shape
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/SSAWLI.c #SHgetExtent
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/WithloopFusion.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/wlswithloopification.c #INFO_INNERDIMS
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/wlsbuild.c #SHtakeFromShape
${CMAKE_CURRENT_SOURCE_DIR}/arrayopt/wlscheck.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/codegen/compile.c #TBmakeNum___ and MEMmalloc
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm_icm2c.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_cuda.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_error.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_fp.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_mt.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_prf.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_sched.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_std.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/regression.c
${CMAKE_CURRENT_SOURCE_DIR}/concurrent/cost_model.c
${CMAKE_CURRENT_SOURCE_DIR}/concurrent/scheduling.c #fixed warnings in next batch
${CMAKE_CURRENT_SOURCE_DIR}/constants/basecv.c
${CMAKE_CURRENT_SOURCE_DIR}/constants/constants_basic.c
${CMAKE_CURRENT_SOURCE_DIR}/constants/constants_struc_ops.c
${CMAKE_CURRENT_SOURCE_DIR}/constants/shape.c
${CMAKE_CURRENT_SOURCE_DIR}/constants/zipcv.c
${CMAKE_CURRENT_SOURCE_DIR}/cudahybrid/cuda_cost_model.c
${CMAKE_CURRENT_SOURCE_DIR}/cuda/partial_fold.c
${CMAKE_CURRENT_SOURCE_DIR}/flatten/wlanalysis.c
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynarray.c
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynarray.h
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynmatrix.c
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynmatrix.h
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/lubtree.c
${CMAKE_CURRENT_SOURCE_DIR}/memory/alloc.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/icm2c_rtspec.c
${CMAKE_CURRENT_SOURCE_DIR}/codegen/regression.c #Matrix int with MEMmalloc
${CMAKE_CURRENT_SOURCE_DIR}/concurrent/cost_model.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/concurrent/scheduling.c #TBmakeNum warnings
${CMAKE_CURRENT_SOURCE_DIR}/constants/basecv.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/constants/constants_basic.c #SHgetDim & SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/constants/constants_struc_ops.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/constants/shape.c #MEMmalloc with dim
${CMAKE_CURRENT_SOURCE_DIR}/cudahybrid/cuda_cost_model.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/cuda/data_access_analysis.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/cuda/infer_reusable_arrays.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/cuda/partial_fold.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/cuda/shared_memory_reuse.c #F_shmem_boundary_load TBmakeNum
${CMAKE_CURRENT_SOURCE_DIR}/flatten/wlanalysis.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/flatten/wldefaultpartition.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynarray.c #DYNARRAY_TOTALELEMS (70 uses) and ALLOCELEMS linked
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/dynmatrix.c #total rows and col int - MEMmalloc warning
${CMAKE_CURRENT_SOURCE_DIR}/flexsub/lubtree.c #LUBINFO_NUMINTRA and LUBgetBlockId
${CMAKE_CURRENT_SOURCE_DIR}/memory/alloc.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/memory/polyhedral_reuse_analysis.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/print/print.c #SHgetDim dim warning
${CMAKE_CURRENT_SOURCE_DIR}/print/convert.c #CVshpseg2String dim warning
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/prfunroll.c
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/SSACSE.c
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/SSALUR.c
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/SSAWLUnroll.c
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/structural_constant_constant_folding.c
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/withloop_invariant_removal.c
${CMAKE_CURRENT_SOURCE_DIR}/support/int_matrix.c
${CMAKE_CURRENT_SOURCE_DIR}/support/ptr_buffer.c
${CMAKE_CURRENT_SOURCE_DIR}/support/str.c
${CMAKE_CURRENT_SOURCE_DIR}/tree/DataFlowMask.c
${CMAKE_CURRENT_SOURCE_DIR}/tree/LookUpTable.c
${CMAKE_CURRENT_SOURCE_DIR}/tree/pattern_match_attribs.c
${CMAKE_CURRENT_SOURCE_DIR}/tree/pattern_match.c #fixed warnings in next batch
${CMAKE_CURRENT_SOURCE_DIR}/tree/traverse.c #fixed warnings in next batch
${CMAKE_CURRENT_SOURCE_DIR}/tree/tree_basic.c #fixed warnings in next batch
${CMAKE_CURRENT_SOURCE_DIR}/tree/tree_utils.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/ct_prf.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/new_types.c #fixed warnings in next batch
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/specialization_oracle_static_shape_knowledge.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/ssi.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/type_errors.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/type_utils.c
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/user_types.c
${CMAKE_CURRENT_SOURCE_DIR}/wltransform/wl_split_dimensions.c
#${CMAKE_CURRENT_SOURCE_DIR}/constraints/insert_conformity_checks.c
#${CMAKE_CURRENT_SOURCE_DIR}/memory/audscldist.c
${CMAKE_CURRENT_SOURCE_DIR}/precompile/functionprecompile.c #RET & ARG_LINKSIGN
${CMAKE_CURRENT_SOURCE_DIR}/scanparse/handle_dots.c #TBmakeNum warnings
${CMAKE_CURRENT_SOURCE_DIR}/scanparse/parser.c #SHmakeShape (n) - n is size_t
${CMAKE_CURRENT_SOURCE_DIR}/scanparse/resolvepragma.c #PRAGMA_NUMPARAMS
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/makedimexpr.c #TBmakeNum with TCcountExprs
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/makeshapeexpr.c #TBmakeNum with TCcountExprs
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/prfunroll.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/SSAWLUnroll.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/saa_constant_folding.c #int COgetDataVec with TCgetNthExprsExpr
${CMAKE_CURRENT_SOURCE_DIR}/stdopt/structural_constant_constant_folding.c #SHgetUnrlen and Idx2OffsetArray
${CMAKE_CURRENT_SOURCE_DIR}/support/str.c #STRstring2Array TBmakeNum (cnt)
${CMAKE_CURRENT_SOURCE_DIR}/tree/pattern_match_attribs.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/tree/tree_utils.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/ct_prf.c #SHgetExtent, UnrLen and COgetDataVec with TYmakeAKD
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/new_types.c #DIM warnings from SH and TY
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/ct_with.c #SHgetExtent
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/specialization_oracle_static_shape_knowledge.c #SHgetExtent
${CMAKE_CURRENT_SOURCE_DIR}/typecheck/type_errors.c #SHgetUnrlen
${CMAKE_CURRENT_SOURCE_DIR}/wltransform/wltransform.c #TYgetDim
${CMAKE_CURRENT_SOURCE_DIR}/wltransform/wl_split_dimensions.c #TYgetDim
# Generated files
${CMAKE_CURRENT_BINARY_DIR}/node_basic.c
${CMAKE_CURRENT_BINARY_DIR}/serialize_helper.c
......
......@@ -613,7 +613,8 @@ static intern_gen *
FinalTransformations (intern_gen *substig, index_info *transformations, int target_dim)
{
intern_gen *tmpig, *newig, *rootig;
int ok, i, *help;
int ok, i,*help;
size_t j;
DBUG_ENTER ();
DBUG_ASSERT (transformations->vector == substig->shape, "wrong parameters");
......@@ -627,9 +628,9 @@ FinalTransformations (intern_gen *substig, index_info *transformations, int targ
iv=[i,j,k]
subst array A[42,i,k]
help: [2,0,3] */
i = sizeof (int) * target_dim;
help = (int *)MEMmalloc (i);
help = (int *)memset (help, 0, i);
j = sizeof (int) * target_dim;
help = (int *)MEMmalloc (j);
help = (int *)memset (help, 0, j);
for (i = 0; i < transformations->vector; i++) {
if (transformations->permutation[i]) {
help[transformations->permutation[i] - 1] = i + 1;
......@@ -1001,13 +1002,14 @@ static intern_gen *
RemoveDoubleIndexVectors (intern_gen *subst_ig, index_info *transformations)
{
int *found, i, act_dim, dim, fdim;
size_t j;
intern_gen *act_ig;
DBUG_ENTER ();
i = sizeof (int) * SHP_SEG_SIZE; /* max number of dimensions */
found = (int *)MEMmalloc (i);
found = (int *)memset (found, 0, i);
j = sizeof (int) * SHP_SEG_SIZE; /* max number of dimensions */
found = (int *)MEMmalloc (j);
found = (int *)memset (found, 0, j);
for (act_dim = 0; act_dim < transformations->vector; act_dim++)
if (transformations->permutation[act_dim] != 0) { /* ==0: constant */
......
......@@ -1437,7 +1437,7 @@ BuildNewGens (node *current_wl, node *fusionable_wl)
if (new_parts_fwl != NULL) {
successful = TRUE;
DBUG_PRINT ("%d new generators created", TCcountParts (new_parts_fwl));
DBUG_PRINT ("%zu new generators created", TCcountParts (new_parts_fwl));
WITH_PART (fusionable_wl) = FREEdoFreeTree (WITH_PART (fusionable_wl));
WITH_PART (fusionable_wl) = new_parts_fwl;
......
......@@ -312,20 +312,20 @@ SimplifySymbioticExpression (node *arg_node, info *arg_info)
{
int i = 0;
int ct = 0;
int countDLIR = 0;
int countWLIR = global.optcounters.wlir_expr;
int countINL = 0;
int countCSE = global.optcounters.cse_expr;
int countTUP = 0;
int countCF = 0;
int countVP = 0;
int countREA = 0;
int countAS = 0;
int countAL = 0;
int countDL = 0;
int countESD = global.optcounters.esd_expr;
int countUESD = 0;
int countDCR = 0;
size_t countDLIR = 0;
size_t countWLIR = global.optcounters.wlir_expr;
size_t countINL = 0;
size_t countCSE = global.optcounters.cse_expr;
size_t countTUP = 0;
size_t countCF = 0;
size_t countVP = 0;
size_t countREA = 0;
size_t countAS = 0;
size_t countAL = 0;
size_t countDL = 0;
size_t countESD = global.optcounters.esd_expr;
size_t countUESD = 0;
size_t countDCR = 0;
DBUG_ENTER ();
......@@ -415,9 +415,9 @@ SimplifySymbioticExpression (node *arg_node, info *arg_info)
/* We do not count DCR, as it's merely for cleanup */
DBUG_PRINT_TAG ("SSE",
"DLIR= %d, WLIR= %d, INL=%d, CSE=%d, TUP=%d, CF=%d, VP=%d, "
"AS=%d, AL=%d, DL=%d, "
"ESD=%d, UESD=%d, DCR=%d",
"DLIR= %zu, WLIR= %zu, INL=%zu, CSE=%zu, TUP=%zu, CF=%zu, VP=%zu, "
"AS=%zu, AL=%zu, DL=%zu, "
"ESD=%zu, UESD=%zu, DCR=%zu",
(global.optcounters.dlir_expr - countDLIR),
(global.optcounters.wlir_expr - countWLIR),
(global.optcounters.inl_fun - countINL),
......@@ -482,7 +482,8 @@ AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **withid)
node *arg = NULL;
;
pattern *pat;
int tcindex = -1;
size_t tcindex = 0;
bool isIdsMember;
node *id;
DBUG_ENTER ();
......@@ -494,8 +495,8 @@ AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **withid)
case N_prf:
if (NULL != PRF_EXPRS2 (arg_node)) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (PRF_ARG2 (arg_node)));
if (-1 != tcindex) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (PRF_ARG2 (arg_node)), &isIdsMember);
if (isIdsMember) {
z = 2;
}
}
......@@ -504,8 +505,8 @@ AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **withid)
* as PRF_ARG1.
*/
if (N_id == NODE_TYPE (id)) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (id));
if (-1 != tcindex) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (id), &isIdsMember);
if (isIdsMember) {
z = 1;
}
}
......@@ -523,8 +524,8 @@ AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **withid)
case N_id:
if (PMmatchFlatSkipExtremaAndGuards (pat, arg_node)) {
if (N_id == NODE_TYPE (arg)) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (arg));
if (-1 != tcindex) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (arg), &isIdsMember);
if (isIdsMember) {
z = 1;
}
} else {
......@@ -537,7 +538,7 @@ AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **withid)
break;
}
if ((NULL != withid) && (z != 0) && (-1 != tcindex)) {
if ((NULL != withid) && (z != 0) && (isIdsMember)) {
*withid = TCgetNthIds (tcindex, withidids);
}
......@@ -635,8 +636,8 @@ bool
AWLFIisValidNoteintersect (node *arg_node, node *pwlid)
{
bool z;
int nexprs;
int npart;
size_t nexprs;
size_t npart;
DBUG_ENTER ();
......@@ -842,8 +843,8 @@ bool
AWLFIisHasAllInverseProjections (node *arg_node)
{
bool z = TRUE;
int intersectListLim;
int intersectListNo;
size_t intersectListLim;
size_t intersectListNo;
node *proj1;
node *proj2;
......@@ -926,7 +927,7 @@ AWLFIisHasInverseProjection (node *arg_node)
*****************************************************************************/
static node *
FlattenLbubel (node *lbub, int ivindx, info *arg_info)
FlattenLbubel (node *lbub, size_t ivindx, info *arg_info)
{
node *lbubelavis;
node *lbubel;
......@@ -950,7 +951,7 @@ FlattenLbubel (node *lbub, int ivindx, info *arg_info)
}
static node *
BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivindx)
BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, size_t ivindx)
{
node *z = NULL;
int markiv;
......@@ -965,7 +966,8 @@ BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivin
node *rhs;
node *withidids;
node *ipavis;
int tcindex;
size_t tcindex;
bool isIdsMember;
prf nprf;
pattern *pat;
......@@ -1000,8 +1002,8 @@ BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivin
switch (NODE_TYPE (idx)) {
case N_id:
tcindex = TClookupIdsNode (withidids, ID_AVIS (idx));
if (-1 != tcindex) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (idx), &isIdsMember);
if (isIdsMember) {
DBUG_PRINT ("Found %s as source of iv'=%s", AVIS_NAME (ID_AVIS (idx)),
AVIS_NAME (ipavis));
INFO_WITHIDS (arg_info) = TCgetNthIds (tcindex, withidids);
......@@ -1245,7 +1247,7 @@ AWLFIflattenScalarNode (node *arg_node, info *arg_info)
*
*****************************************************************************/
static node *
BuildAxisConfluence (node *zarr, int idx, node *zelnew, node *bndel, int boundnum,
BuildAxisConfluence (node *zarr, size_t idx, node *zelnew, node *bndel, int boundnum,
info *arg_info)
{
......@@ -1324,17 +1326,18 @@ static node *
PermuteIntersectElements (node *zelu, node *zwithids, info *arg_info, int boundnum)
{
node *ids;
int shpz;
int shpids;
int shpzelu;
int i;
int idx;
size_t shpz;
size_t shpids;
size_t shpzelu;
size_t i;
size_t idx;
bool isIdsMember;
pattern *pat;
node *bndarr = NULL;
node *zarr;
node *z;
node *zelnew;
int xrho = -1;
size_t xrho = 0;
node *bndel;
ntype *typ;
......@@ -1389,8 +1392,8 @@ PermuteIntersectElements (node *zelu, node *zwithids, info *arg_info, int boundn
shpzelu = TCcountExprs (zelu);
for (i = 0; i < shpzelu; i++) {
idx = TClookupIdsNode (ids, TCgetNthIds (i, zwithids));
if (-1 != idx) { /* skip places where idx is a constant, etc. */
idx = TClookupIdsNode (ids, TCgetNthIds (i, zwithids), &isIdsMember);
if (isIdsMember) { /* skip places where idx is a constant, etc. */
/* E.g., sel( [ JJ, 2], PWL); */
zelnew = TCgetNthExprsExpr (i, zelu);
bndel = TCgetNthExprsExpr (idx, ARRAY_AELEMS (bndarr));
......@@ -1463,9 +1466,9 @@ BuildInverseProjectionOne (node *arg_node, info *arg_info, node *arriv, node *lb
node *zw = NULL;
node *iprime;
node *ziavis;
int dim;
size_t dim;
int ivindx;
size_t ivindx;
DBUG_ENTER ();
dim = SHgetUnrLen (ARRAY_FRAMESHAPE (lbub));
......@@ -1554,10 +1557,10 @@ BuildInverseProjections (node *arg_node, info *arg_info)
pattern *pat2;
pattern *pat3;
pattern *pat4;
int numpart;
int curpart;
int curelidxlb;
int curelidxub;
size_t numpart;
size_t curpart;
size_t curelidxlb;
size_t curelidxub;
bool swaplb = FALSE;
bool swapub = FALSE;
node *tmp;
......@@ -1591,7 +1594,7 @@ BuildInverseProjections (node *arg_node, info *arg_info)
for (curpart = 0; curpart < numpart; curpart++) {
curelidxlb = WLPROJECTION1 (curpart);
curelidxub = WLPROJECTION2 (curpart);
DBUG_PRINT ("Building inverse projection for %s, partition #%d",
DBUG_PRINT ("Building inverse projection for %s, partition #%zu",
AVIS_NAME (ID_AVIS (PRF_ARG1 (arg_node))), curpart);
intrlb = TCgetNthExprsExpr (WLINTERSECTION1 (curpart), PRF_ARGS (arg_node));
intrub = TCgetNthExprsExpr (WLINTERSECTION2 (curpart), PRF_ARGS (arg_node));
......@@ -1655,7 +1658,7 @@ BuildInverseProjections (node *arg_node, info *arg_info)
zeu = tmp;
}
DBUG_PRINT ("Building axis permute & confluence for %s, partn #%d",
DBUG_PRINT ("Building axis permute & confluence for %s, partn #%zu",
AVIS_NAME (ID_AVIS (PRF_ARG1 (arg_node))), curpart);
zlb = PermuteIntersectElements (zel, zwlb, arg_info, 0);
......@@ -1805,7 +1808,7 @@ noDefaultPartition (node *arg_node)
*
******************************************************************************/
node *
AWLFItakeDropIv (int takect, int dropct, node *arg_node, node **vardecs,
AWLFItakeDropIv (int takect, size_t dropct, node *arg_node, node **vardecs,
node **preassigns)
{
node *z;
......@@ -2637,7 +2640,7 @@ AWLFIcheckBothFoldable (node *pwlid, node *cwlids, int cwllevel)
node *
AWLFIfundef (node *arg_node, info *arg_info)
{
int optctr;
size_t optctr;
DBUG_ENTER ();
......@@ -2648,7 +2651,7 @@ AWLFIfundef (node *arg_node, info *arg_info)
FUNDEF_NAME (arg_node));
optctr = global.optcounters.awlfi_expr;
DBUG_PRINT ("At AWLFIfundef entry, global.optcounters.awlfi_expr is %d", optctr);
DBUG_PRINT ("At AWLFIfundef entry, global.optcounters.awlfi_expr is %zu", optctr);
if (FUNDEF_BODY (arg_node) != NULL) {
arg_node = SWLDdoSetWithloopDepth (arg_node);
......@@ -2663,7 +2666,7 @@ AWLFIfundef (node *arg_node, info *arg_info)
}
if (global.optcounters.awlfi_expr != optctr) {
DBUG_PRINT ("optcounters was %d; is now %d", optctr,
DBUG_PRINT ("optcounters was %zu; is now %zu", optctr,
global.optcounters.awlfi_expr);
arg_node = SimplifySymbioticExpression (arg_node, arg_info);
}
......
......@@ -27,7 +27,7 @@ extern int AWLFIfindPrfParent2 (node *arg_node, node *withidids, node **infowith
extern node *AWLFIflattenExpression (node *arg_node, node **vardecs, node **preassigns,
ntype *ztype);
extern node *AWLFItakeDropIv (int takect, int dropct, node *arg_node, node **vardecs,
extern node *AWLFItakeDropIv (int takect, size_t dropct, node *arg_node, node **vardecs,
node **preassigns);
extern bool AWLFIcheckProducerWLFoldable (node *arg_node);
extern bool AWLFIcheckBothFoldable (node *pwlid, node *cwlids, int cwllevel);
......
......@@ -434,7 +434,7 @@ isNotInt1Part (node *arg_node)
*
*****************************************************************************/
static void
SetWLProjections (node *noteint, int intersectListNo, info *arg_info)
SetWLProjections (node *noteint, size_t intersectListNo, info *arg_info)
{
DBUG_ENTER ();
......@@ -451,18 +451,18 @@ SetWLProjections (node *noteint, int intersectListNo, info *arg_info)
/** <!--********************************************************************-->
*
* @fn static GetNthPart( int partno, node *npart)
* @fn static GetNthPart( size_t partno, node *npart)
*
* @brief Get npart[partno] for npart.
*
* @param partno: non_negative integer partition index
* @param partno: non_negative size_t partition index
* @param npart: A WITH_PART node.
*
* @result: The partno'th N_part of npart.
*
*****************************************************************************/
static node *
GetNthPart (int partno, node *npart)
GetNthPart (size_t partno, node *npart)
{
node *z;
......@@ -507,8 +507,8 @@ FindIntersection (node *idx, node *producerWLGenerator, node *cwlp, info *arg_in
node *proj2 = NULL;
node *noteint;
pattern *pat;
int intersectListNo;
int intersectListLim;
size_t intersectListNo;
size_t intersectListLim;
node *cwlpb1;
node *cwlpb2;
bool cwlpstepok;
......@@ -549,7 +549,7 @@ FindIntersection (node *idx, node *producerWLGenerator, node *cwlp, info *arg_in
while (((INTERSECT_unknown == z) || (INTERSECT_null == z))
&& (intersectListNo < intersectListLim)) {
DBUG_PRINT ("Started check of partition #%d", intersectListNo);
DBUG_PRINT ("Started check of partition #%zu", intersectListNo);
proj1 = TCgetNthExprsExpr (WLPROJECTION1 (intersectListNo), PRF_ARGS (noteint));
proj2 = TCgetNthExprsExpr (WLPROJECTION2 (intersectListNo), PRF_ARGS (noteint));
......@@ -620,7 +620,7 @@ FindIntersection (node *idx, node *producerWLGenerator, node *cwlp, info *arg_in
DBUG_PRINT ("Generator field(s) changed underfoot");
z = INTERSECT_null;
}
DBUG_PRINT ("Finished check of partition #%d", intersectListNo);
DBUG_PRINT ("Finished check of partition #%zu", intersectListNo);
intersectListNo++;
}
pat = PMfree (pat);
......@@ -1029,7 +1029,7 @@ FindMarkedSelAssignParent (node *assgn)
*
*****************************************************************************/
static node *
performFold (node *cwlpart, int partno, info *arg_info)
performFold (node *cwlpart, size_t partno, info *arg_info)
{
node *pwlblock;
node *newpblock;
......@@ -1190,8 +1190,8 @@ BuildSubcubes (node *arg_node, info *arg_info)
{
node *newpartns = NULL;
node *newcwlpart;
int partno;
int partlim;
size_t partno;
size_t partlim;
node *lb;
node *ub;
node *noteintersect;
......@@ -1219,7 +1219,7 @@ BuildSubcubes (node *arg_node, info *arg_info)
if (partlim == 1) { // Do not slice simple compositions
newpartns = performFold (DUPdoDupNode (arg_node), partno, arg_info);
} else {
DBUG_PRINT ("Slicing partition %s into %d pieces",
DBUG_PRINT ("Slicing partition %s into %zu pieces",
AVIS_NAME (IDS_AVIS (INFO_LHS (arg_info))), partlim);
while (partno < partlim) {
PMmatchFlat (patlb, TCgetNthExprsExpr (WLPROJECTION1 (partno),
......
......@@ -510,7 +510,7 @@ CreateIvArray (node *arg_node, node **vardecs, node **preassigns)
node *ids;
node *assgn;
node *nlet;
int len;
size_t len;
node *z;
DBUG_ENTER ();
......
......@@ -807,8 +807,8 @@ IVEXPadjustExtremaBound (node *arg_node, int k, node **vardecs, node **preassign
node *aelems = NULL;
node *argid;
pattern *pat;
int i;
int lim;
size_t i;
size_t lim;
node *el;
node *zarr;
node *z;
......
......@@ -554,7 +554,7 @@ IVEXItmpVec (node *arg_node, info *arg_info, node *ivavis)
/** <!--********************************************************************-->
*
* @fn node *IVEXItmpIds( node *arg_node, info *arg_info, node* oldavis, int k)
* @fn node *IVEXItmpIds( node *arg_node, info *arg_info, node* oldavis, size_t k)
*
* @brief: Same as IVEXItmpVec, except this one handles one
* of the WITHID_IDS scalar variables i,j,k in
......@@ -571,7 +571,7 @@ IVEXItmpVec (node *arg_node, info *arg_info, node *ivavis)
*
*****************************************************************************/
node *
IVEXItmpIds (node *curpart, node *iavis, int k, node **preassignspart, node **vardecs)
IVEXItmpIds (node *curpart, node *iavis, size_t k, node **preassignspart, node **vardecs)
{
node *avisp;
node *avispp;
......@@ -626,7 +626,7 @@ populateLUTVars (node *arg_node, info *arg_info)
node *oldavis;
node *navis;
node *ids;
int k = 0;
size_t k = 0;
DBUG_ENTER ();
......@@ -1135,18 +1135,19 @@ IVEXIap (node *arg_node, info *arg_info)
*
******************************************************************************/
node *
IVEXIwithidsKludge (int offset, node *withidids, node *curpart, node **preassignspart,
IVEXIwithidsKludge (size_t offset, node *withidids, node *curpart, node **preassignspart,
node **vardecs)
{
node *z = NULL;
node *ijk;
bool isIdsMember;
DBUG_ENTER ();
ijk = TCgetNthExprsExpr (offset, ARRAY_AELEMS (withidids));
if (NULL != curpart) {
offset = LFUindexOfMemberIds (ID_AVIS (ijk), WITHID_IDS (PART_WITHID (curpart)));
if (-1 != offset) {
offset = LFUindexOfMemberIds (ID_AVIS (ijk), WITHID_IDS (PART_WITHID (curpart)), &isIdsMember);
if (isIdsMember) {
z = TCgetNthIds (offset, WITHID_IDS (PART_WITHID (curpart)));
if (IVEXIisExtremaActive ()) {
z = IVEXItmpIds (curpart, z, offset, preassignspart, vardecs);
......
......@@ -31,7 +31,7 @@ extern node *IVEXIids (node *arg_node, info *arg_info);
extern node *IVEXIid (node *arg_node, info *arg_info);
extern node *IVEXImakeIntScalar (int k, node **vardecs, node **preassigns);
extern node *IVEXIwithidsKludge (int offset, node *withidvec, node *curpart,
extern node *IVEXIwithidsKludge (size_t offset, node *withidvec, node *curpart,
node **preassignspart, node **vardecs);
extern node *IVEXIattachExtrema (node *extremum, node *ivavis, node **vardecs,
node **preassigns, prf nprf);
......
......@@ -759,30 +759,34 @@ LFUisAvisMemberExprs (node *arg_node, node *exprs)
* @brief: Function for finding the index of an N_avis node
* in an N_ids chain.
*
* @param: arg_node - an N_avis node.
* ids - an N_ids chain.
* @param: arg_node - an N_avis node.
* ids - an N_ids chain.
* isIdsMember - pointer passing back result of search for
* whether arg_node is a member of the ids chain.
*
* @result: 0...(length of idschain -1) if arg_node is a member of the ids chain.
* -1 if arg_node is not a member of the ids chain.
* @result: 0...(length of idschain -1).
* .
*
*****************************************************************************/
int
LFUindexOfMemberIds (node *arg_node, node *ids)
size_t
LFUindexOfMemberIds (node *arg_node, node *ids, bool *isIdsMember)
{
int z = -1;
int j = 0;
size_t z = 0;
size_t j = 0;
*isIdsMember = FALSE;
DBUG_ENTER ();
DBUG_ASSERT (N_avis == NODE_TYPE (arg_node), "Expected N_avis node");
while ((NULL != ids) && (-1 == z)) {
while ((NULL != ids) && (FALSE == *isIdsMember)) {
if (arg_node == IDS_AVIS (ids)) {
z = j;
*isIdsMember = TRUE;
}
ids = IDS_NEXT (ids);
j++;
}
DBUG_RETURN (z);
}
......
......@@ -17,7 +17,7 @@ extern node *LFUfindAssignOfType (node *assigns, nodetype n);
extern bool LFUisLURPredicate (node *arg_node);
extern bool LFUisAvisMemberIds (node *arg_node, node *ids);
extern bool LFUisAvisMemberArg (node *arg_node, node *arg);
extern int LFUindexOfMemberIds (node *arg_node, node *ids);
extern size_t LFUindexOfMemberIds (node *arg_node, node *ids, bool *isIdsMember);
extern bool LFUisAvisMemberExprs (node *arg_node, node *exprs);
extern node *LFUinsertAssignIntoLacfun (node *arg_node, node *assign, node *oldavis);
extern int LFUisLoopInvariantArg (node *arg, node *fundef);
......
......@@ -373,7 +373,7 @@ struct INFO {
node *ap;
node *newlacfunargs;
node *preassignslacfun;
int argnum;
size_t argnum;
bool inap;
};
......@@ -451,7 +451,7 @@ CreateArg (constant *idx, void *accu, void *scalar_type)
*
*****************************************************************************/
static bool
LACSIargHasAvisScalars (int argnum, node *ap)
LACSIargHasAvisScalars (size_t argnum, node *ap)
{
node *arg;
bool z;
......
......@@ -224,8 +224,8 @@ PHUTisFundefKludge (node *arg_node)
void
PHUTprintIslAffineFunctionTree (node *arg_node)
{
int n;
int j;
size_t n;
size_t j;
DBUG_ENTER ();
n = TCcountExprs (arg_node);
......@@ -283,7 +283,7 @@ Node2Value (node *arg_node)
break;
case N_bool:
z = TBmakeNum ((int)BOOL_VAL (arg_node));
z = TBmakeNum ((int)BOOL_VAL (arg_node)); //FIXME there may be a better solution, but this temporarily fixes the warning
break;
default:
......@@ -692,7 +692,7 @@ BuildIslStrideConstraint (node *ids, prf nprf1, node *arg1, prf nprf2, node *arg
/** <!-- ****************************************************************** -->
*
* @fn node *findBoundEl( node *arg_node, node *bnd, int k...)
* @fn node *findBoundEl( node *arg_node, node *bnd, size_t k...)
*
* @brief arg_node may represent a WITHID element for a WL.
* If so, generate an ISL constraint of:
......@@ -709,16 +709,14 @@ BuildIslStrideConstraint (node *ids, prf nprf1, node *arg1, prf nprf2, node *arg
*
******************************************************************************/
static node *
findBoundEl (node *arg_node, node *bnd, int k)
findBoundEl (node *arg_node, node *bnd, size_t k)
{
node *z = NULL;
DBUG_ENTER ();
if ((NULL != AVIS_NPART (arg_node)) && (NULL != bnd)) {
if (-1 != k) {
z = TCgetNthExprsExpr (k, ARRAY_AELEMS (bnd));
}
z = TCgetNthExprsExpr (k, ARRAY_AELEMS (bnd));
}
DBUG_RETURN (z);
......@@ -803,7 +801,8 @@ PHUTcollectWlGenerator (node *arg_node, node *fundef, lut_t *varlut, node *res,
node *lbel;
node *ubel;
node *ivavis;
int k;
size_t k;
bool isIdsMember;
node *lb;
node *ub;
node *stp;
......@@ -819,8 +818,8 @@ PHUTcollectWlGenerator (node *arg_node, node *fundef, lut_t *varlut, node *res,
partn = AVIS_NPART (arg_node);
if ((NULL != partn)) {
k = LFUindexOfMemberIds (arg_node, WITHID_IDS (PART_WITHID (partn)));
if (-1 != k) {
k = LFUindexOfMemberIds (arg_node, WITHID_IDS (PART_WITHID (partn)), &isIdsMember);
if (isIdsMember) {
DBUG_PRINT ("Generating generator constraints for %s", AVIS_NAME (arg_node));
ivavis = TCgetNthIds (k, WITHID_IDS (PART_WITHID (partn)));
lb = WLUTfindArrayForBound (GENERATOR_BOUND1 (PART_GENERATOR (partn)));
......@@ -936,8 +935,8 @@ CountVariablesInIslclass (node *idlist, int islclass)
node *avis;
char *fn;
int n;
int i;
size_t n;
size_t i;
int z = 0;
DBUG_ENTER ();
......@@ -962,8 +961,8 @@ static void
WriteSetVariables (FILE *handle, node *idlist, lut_t *varlut)
{
node *avis;
int i;
int n;
size_t i;
size_t n;
int inclass;
int numleft;
char *funname;
......@@ -1022,8 +1021,8 @@ WriteExistsSetVariables (FILE *handle, node *idlist, lut_t *varlut)
{
node *avis;
char *funname;
int i;
int n;
size_t i;
size_t n;
bool z;
DBUG_ENTER ();
......@@ -1061,8 +1060,8 @@ static void
WriteParameterVariables (FILE *handle, node *idlist, lut_t *varlut)
{
node *avis;
int i;
int n;
size_t i;
size_t n;
int inclass;
int numleft;
......@@ -1147,10 +1146,10 @@ printIslArg (FILE *handle, node *expr, lut_t *varlut)
}
static void
EmitOneConstraint (FILE *handle, int mone, node *exprsone, lut_t *varlut)
EmitOneConstraint (FILE *handle, size_t mone, node *exprsone, lut_t *varlut)
{ // Bog-standard constraints
node *expr;
int k;
size_t k;
bool wasor;
DBUG_ENTER ();
......@@ -1200,10 +1199,10 @@ void
PHUTwriteUnionSet (FILE *handle, node *exprs, lut_t *varlut, char *tag, bool isunionset,
char *lhsname)
{
int j;
int m;
int mone;
int n;
size_t j;
size_t m;
size_t mone;
size_t n;
node *idlist;
node *exprsone;
node *avis;
......@@ -1865,7 +1864,8 @@ HandleSelectWithIota (node *ids, node *q, node *fundef, lut_t *varlut, int loopc
node *ub = NULL;
node *lbub = NULL;
node *withidids = NULL;
int idsidx;
size_t idsidx;
bool isIdsMember;
DBUG_ENTER ();
......@@ -1876,8 +1876,8 @@ HandleSelectWithIota (node *ids, node *q, node *fundef, lut_t *varlut, int loopc
if (N_with == NODE_TYPE (wl)) {
// Find generator elements for LB and UB.
withidids = WITHID_IDS (PART_WITHID (WITH_PART (wl)));
idsidx = TClookupIdsNode (withidids, s);
DBUG_ASSERT (-1 != idsidx, "Could not find withidids element");
idsidx = TClookupIdsNode (withidids, s, &isIdsMember);
DBUG_ASSERT (isIdsMember, "Could not find withidids element");
lbub = GENERATOR_BOUND1 (PART_GENERATOR (WITH_PART (wl)));
if (N_array == NODE_TYPE (lbub)) {
// Emit lb <= s
......@@ -2290,6 +2290,7 @@ PHUTcollectAffineExprsLocal (node *arg_node, node *fundef, lut_t *varlut, node *
node *npart = NULL;
node *nid;
int cls;
bool isIdsMember;
DBUG_ENTER ();
......@@ -2338,9 +2339,8 @@ PHUTcollectAffineExprsLocal (node *arg_node, node *fundef, lut_t *varlut, node *
npart = AVIS_NPART (avis);
if ((NULL != npart)
&& (avis != IDS_AVIS (WITHID_VEC (PART_WITHID (npart))))) {
if (-1
!= LFUindexOfMemberIds (avis, WITHID_IDS (
PART_WITHID (npart)))) {
LFUindexOfMemberIds (avis, WITHID_IDS (PART_WITHID (npart)), &isIdsMember);
if (isIdsMember) {
// arg_node is a withid element.
res3 = PHUTcollectWlGenerator (avis, fundef, varlut, NULL,
loopcount);
......@@ -2681,7 +2681,7 @@ PHUTfindLoopDependentVarinAft (node *arg_node, node *aft, node *fundef)
{
node *res = NULL;
node *aftone;
int cnt;
size_t cnt;
DBUG_ENTER ();
......
......@@ -470,7 +470,7 @@ PWLFperformFold (node *arg_node, node *pwlpart, info *arg_info)
*
*****************************************************************************/
static node *
FlattenLbubel (node *lbub, int ivindx, info *arg_info)
FlattenLbubel (node *lbub, size_t ivindx, info *arg_info)
{
node *lbubelavis;
node *lbubel;
......@@ -494,7 +494,7 @@ FlattenLbubel (node *lbub, int ivindx, info *arg_info)
}
static node *
BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivindx)
BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, size_t ivindx)
{
node *z = NULL;
int markiv;
......@@ -509,7 +509,8 @@ BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivin
node *rhs;
node *withidids;
node *ipavis;
int tcindex;
size_t tcindex;
bool isIdsMember;
prf nprf;
pattern *pat;
......@@ -544,8 +545,8 @@ BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivin
switch (NODE_TYPE (idx)) {
case N_id:
tcindex = TClookupIdsNode (withidids, ID_AVIS (idx));
if (-1 != tcindex) {
tcindex = TClookupIdsNode (withidids, ID_AVIS (idx), &isIdsMember);
if (isIdsMember) {
DBUG_PRINT ("Found %s as source of iv'=%s", AVIS_NAME (ID_AVIS (idx)),
AVIS_NAME (ipavis));
INFO_WITHIDS (arg_info) = TCgetNthIds (tcindex, withidids);
......@@ -759,7 +760,7 @@ BuildInverseProjectionScalar (node *iprime, info *arg_info, node *lbub, int ivin
*
*****************************************************************************/
static node *
BuildAxisConfluence (node *zarr, int idx, node *zelnew, node *bndel, int boundnum,
BuildAxisConfluence (node *zarr, size_t idx, node *zelnew, node *bndel, int boundnum,
info *arg_info)
{
......@@ -838,17 +839,18 @@ static node *
PermuteIntersectElements (node *zelu, node *zwithids, info *arg_info, int boundnum)
{
node *ids;
int shpz;
int shpids;
int shpzelu;
int i;
int idx;
size_t shpz;
size_t shpids;
size_t shpzelu;
size_t i;
size_t idx;
bool isIdsMember;
pattern *pat;
node *bndarr = NULL;
node *zarr;
node *z;
node *zelnew;
int xrho = -1;
size_t xrho = 0;
node *bndel;
ntype *typ;
......@@ -902,8 +904,8 @@ PermuteIntersectElements (node *zelu, node *zwithids, info *arg_info, int boundn
shpzelu = TCcountExprs (zelu);
for (i = 0; i < shpzelu; i++) {
idx = TClookupIdsNode (ids, TCgetNthIds (i, zwithids));
if (-1 != idx) { /* skip places where idx is a constant, etc. */
idx = TClookupIdsNode (ids, TCgetNthIds (i, zwithids), &isIdsMember);
if (isIdsMember) { /* skip places where idx is a constant, etc. */
/* E.g., sel( [ JJ, 2], PWL); */
zelnew = TCgetNthExprsExpr (i, zelu);
bndel = TCgetNthExprsExpr (idx, ARRAY_AELEMS (bndarr));
......@@ -976,9 +978,9 @@ BuildInverseProjectionOne (node *arg_node, info *arg_info, node *arriv, node *lb
node *zw = NULL;
node *iprime;
node *ziavis;
int dim;
size_t dim;
int ivindx;
size_t ivindx;
DBUG_ENTER ();
dim = SHgetUnrLen (ARRAY_FRAMESHAPE (lbub));
......@@ -1067,10 +1069,10 @@ BuildInverseProjections (node *arg_node, info *arg_info)
pattern *pat2;
pattern *pat3;
pattern *pat4;
int numpart;
int curpart;
int curelidxlb;
int curelidxub;
size_t numpart;
size_t curpart;
size_t curelidxlb;
size_t curelidxub;
bool swaplb = FALSE;
bool swapub = FALSE;
node *tmp;
......@@ -1104,7 +1106,7 @@ BuildInverseProjections (node *arg_node, info *arg_info)
for (curpart = 0; curpart < numpart; curpart++) {
curelidxlb = WLPROJECTION1 (curpart);
curelidxub = WLPROJECTION2 (curpart);
DBUG_PRINT ("Building inverse projection for %s, partition #%d",
DBUG_PRINT ("Building inverse projection for %s, partition #%zu",
AVIS_NAME (ID_AVIS (PRF_ARG1 (arg_node))), curpart);
intrlb = TCgetNthExprsExpr (WLINTERSECTION1 (curpart), PRF_ARGS (arg_node));
intrub = TCgetNthExprsExpr (WLINTERSECTION2 (curpart), PRF_ARGS (arg_node));
......@@ -1168,7 +1170,7 @@ BuildInverseProjections (node *arg_node, info *arg_info)
zeu = tmp;
}
DBUG_PRINT ("Building axis permute & confluence for %s, partn #%d",
DBUG_PRINT ("Building axis permute & confluence for %s, partn #%zu",
AVIS_NAME (ID_AVIS (PRF_ARG1 (arg_node))), curpart);
zlb = PermuteIntersectElements (zel, zwlb, arg_info, 0);
......@@ -1253,8 +1255,8 @@ PWLFintersectBoundsPolyhedral (node *arg_node, node *pwlpart, info *arg_info)
pattern *pat;
node *arravis;
node *arrid;
int i;
int shp;
size_t i;
size_t shp;
int z = POLY_RET_UNKNOWN;
DBUG_ENTER ();
......
......@@ -82,15 +82,17 @@ WLUTisIdsMemberPartition (node *arg_node, node *partn)
{
bool z = FALSE;
node *nassgns;
bool isIdsMember;
DBUG_ENTER ();
if (NULL != partn) {
nassgns = BLOCK_ASSIGNS (CODE_CBLOCK (PART_CODE (partn)));
while ((NULL != nassgns) && (!z)) {
if (-1
!= LFUindexOfMemberIds (ID_AVIS (arg_node),
LET_IDS (ASSIGN_STMT (nassgns)))) {
LFUindexOfMemberIds (ID_AVIS (arg_node),
LET_IDS (ASSIGN_STMT (nassgns)),
&isIdsMember);
if (isIdsMember) {
z = TRUE;
}
nassgns = ASSIGN_NEXT (nassgns);
......@@ -612,8 +614,7 @@ WLUTgetGenarrayScalar (node *arg_node, bool nowithid)
// We are almost there. We have to ensure that res [IS/ IS NOT]
// a member of WITHID_IDS.
memberwithids
= -1 != TClookupIdsNode (WITHID_IDS (PART_WITHID (WITH_PART (wl))), res);
TClookupIdsNode (WITHID_IDS (PART_WITHID (WITH_PART (wl))), res, &memberwithids);
z = memberwithids ^ nowithid; // XOR corrects value
res = z ? res : NULL;
}
......
......@@ -109,7 +109,7 @@
*
*****************************************************************************/
struct INFO {
int genarrays;
size_t genarrays;
node *shape;
int idsused;
bool isfullpartition;
......@@ -678,7 +678,7 @@ WLFLTavis (node *arg_node, info *arg_info)
node *
WLFLTwith (node *arg_node, info *arg_info)
{
int wlopsno;
size_t wlopsno;
node *oldlhs;
DBUG_ENTER ();
......
......@@ -100,7 +100,7 @@ struct INFO {
travstate travstate;
node *ap;
node *lacfunarg;
int argnum;
size_t argnum;
bool iscondfun;
node *newlacfunargs;
node *newlacfunreccall;
......@@ -730,7 +730,7 @@ WLPROPid (node *arg_node, info *arg_info)
if (S_withloop_prop == INFO_TRAVSTATE (arg_info)) {
DBUG_PRINT ("Checking argument number %i, N_id=%s", INFO_ARGNUM (arg_info),
DBUG_PRINT ("Checking argument number %zu, N_id=%s", INFO_ARGNUM (arg_info),
AVIS_NAME (ID_AVIS (arg_node)));
/*
......
......@@ -367,7 +367,7 @@ WLSfundef (node *arg_node, info *arg_info)
node *
WLSwith (node *arg_node, info *arg_info)
{
int innerdims;
size_t innerdims;
DBUG_ENTER ();
......
......@@ -25,7 +25,7 @@ extern node *WLSmodule (node *arg_node, info *arg_info);
* prefix: WLSC
*
*****************************************************************************/
extern int WLSCdoCheck (node *with, node *nassign);
extern size_t WLSCdoCheck (node *with, node *nassign);
extern node *WLSCblock (node *arg_node, info *arg_info);
extern node *WLSCcode (node *arg_node, info *arg_info);
......@@ -47,7 +47,7 @@ extern node *WLSCpropagate (node *arg_node, info *arg_info);
* prefix: WLSW
*
*****************************************************************************/
extern node *WLSWdoWithloopify (node *arg_node, node *fundef, int innerdims);
extern node *WLSWdoWithloopify (node *arg_node, node *fundef, size_t innerdims);
extern node *WLSWcode (node *arg_node, info *arg_info);
extern node *WLSWid (node *arg_node, info *arg_info);
......