forked from OSchip/llvm-project
[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:
parent
c163fac184
commit
a9033aaba2
|
@ -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()));
|
||||
|
|
Loading…
Reference in New Issue