[polly] r233479 - Use an early return on failure
Tobias Grosser
tobias at grosser.es
Sat Mar 28 07:50:33 PDT 2015
Author: grosser
Date: Sat Mar 28 09:50:32 2015
New Revision: 233479
URL: http://llvm.org/viewvc/llvm-project?rev=233479&view=rev
Log:
Use an early return on failure
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=233479&r1=233478&r2=233479&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Mar 28 09:50:32 2015
@@ -1534,7 +1534,6 @@ bool Scop::buildAliasGroups(AliasAnalysi
AG.clear();
}
- bool Valid = true;
for (AliasGroupTy &AG : AliasGroups) {
if (AG.empty())
continue;
@@ -1551,16 +1550,16 @@ bool Scop::buildAliasGroups(AliasAnalysi
Locations = isl_union_set_intersect_params(Locations, getAssumedContext());
Locations = isl_union_set_coalesce(Locations);
Locations = isl_union_set_detect_equalities(Locations);
- Valid = (0 == isl_union_set_foreach_set(Locations, buildMinMaxAccess,
- MinMaxAccesses));
+ bool Valid = (0 == isl_union_set_foreach_set(Locations, buildMinMaxAccess,
+ MinMaxAccesses));
isl_union_set_free(Locations);
MinMaxAliasGroups.push_back(MinMaxAccesses);
if (!Valid)
- break;
+ return false;
}
- return Valid;
+ return true;
}
static unsigned getMaxLoopDepthInRegion(const Region &R, LoopInfo &LI) {
More information about the llvm-commits
mailing list