[polly] r231304 - Simplify dropConstantScheduleDims [NFC]
Johannes Doerfert
doerfert at cs.uni-saarland.de
Wed Mar 4 14:23:21 PST 2015
Author: jdoerfert
Date: Wed Mar 4 16:23:21 2015
New Revision: 231304
URL: http://llvm.org/viewvc/llvm-project?rev=231304&view=rev
Log:
Simplify dropConstantScheduleDims [NFC]
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=231304&r1=231303&r2=231304&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed Mar 4 16:23:21 2015
@@ -1590,17 +1590,16 @@ void Scop::dropConstantScheduleDims() {
isl_map *DropDimMap = isl_set_identity(isl_set_copy(ScheduleSpace));
int NumDimsDropped = 0;
- for (unsigned i = 0; i < isl_set_dim(ScheduleSpace, isl_dim_set); i++)
- if (i % 2 == 0) {
- isl_val *FixedVal =
- isl_set_plain_get_val_if_fixed(ScheduleSpace, isl_dim_set, i);
- if (isl_val_is_int(FixedVal)) {
- DropDimMap =
- isl_map_project_out(DropDimMap, isl_dim_out, i - NumDimsDropped, 1);
- NumDimsDropped++;
- }
- isl_val_free(FixedVal);
+ for (unsigned i = 0; i < isl_set_dim(ScheduleSpace, isl_dim_set); i += 2) {
+ isl_val *FixedVal =
+ isl_set_plain_get_val_if_fixed(ScheduleSpace, isl_dim_set, i);
+ if (isl_val_is_int(FixedVal)) {
+ DropDimMap =
+ isl_map_project_out(DropDimMap, isl_dim_out, i - NumDimsDropped, 1);
+ NumDimsDropped++;
}
+ isl_val_free(FixedVal);
+ }
for (auto *S : *this) {
isl_map *Schedule = S->getScattering();
More information about the llvm-commits
mailing list