[ZoneAlgo] Consolditate condition. NFC.

No need to create an OptimizationRemarkMissed object if we are not going
to use it anyway.

llvm-svn: 310454
This commit is contained in:
Michael Kruse 2017-08-09 09:29:09 +00:00
parent c163fac184
commit a9033aaba2
1 changed files with 7 additions and 8 deletions

View File

@ -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()));