2 * Copyright 2020 Cerebras Systems
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA
10 #include <isl_pw_macro.h>
12 /* isl_pw_*_every_piece callback that checks whether "set" and "el"
13 * are free of local variables.
15 static isl_bool
FN(PW
,piece_no_local
)(__isl_keep isl_set
*set
,
16 __isl_keep EL
*el
, void *user
)
20 involves
= isl_set_involves_locals(set
);
21 if (involves
>= 0 && !involves
)
22 involves
= FN(EL
,involves_locals
)(el
);
24 return isl_bool_not(involves
);
27 /* Does "pw" involve any local variables, i.e., integer divisions?
29 isl_bool
FN(PW
,involves_locals
)(__isl_keep PW
*pw
)
33 no_locals
= FN(PW
,every_piece
)(pw
, &FN(PW
,piece_no_local
), NULL
);
34 return isl_bool_not(no_locals
);