Skip to content

Commit

Permalink
[ZoneAlgo] Consolditate condition. NFC.
Browse files Browse the repository at this point in the history
No need to create an OptimizationRemarkMissed object if we are not going
to use it anyway.

llvm-svn: 310454
  • Loading branch information
Meinersbur committed Aug 9, 2017
1 parent c163fac commit a9033aa
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions polly/lib/Transform/ZoneAlgo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,15 @@ bool ZoneAlgorithm::isCompatibleStmt(ScopStmt *Stmt) {
}

// Do not allow more than one store to the same location.
if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep())) {
if (!isl_union_map_is_disjoint(Stores.keep(), AccRel.keep()) &&
!onlySameValueWrites(Stmt)) {
OptimizationRemarkMissed R(PassName, "StoreAfterStore",
MA->getAccessInstruction());
if (!onlySameValueWrites(Stmt)) {
R << "store after store of same element in same statement";
R << " (previous stores: " << Stores;
R << ", storing: " << AccRel << ")";
S->getFunction().getContext().diagnose(R);
return false;
}
R << "store after store of same element in same statement";
R << " (previous stores: " << Stores;
R << ", storing: " << AccRel << ")";
S->getFunction().getContext().diagnose(R);
return false;
}

Stores = give(isl_union_map_union(Stores.take(), AccRel.take()));
Expand Down

0 comments on commit a9033aa

Please sign in to comment.