[polly] r310454 - [ZoneAlgo] Consolditate condition. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 02:29:09 PDT 2017
Author: meinersbur
Date: Wed Aug 9 02:29:09 2017
New Revision: 310454
URL: http://llvm.org/viewvc/llvm-project?rev=310454&view=rev
Log:
[ZoneAlgo] Consolditate condition. NFC.
No need to create an OptimizationRemarkMissed object if we are not going
to use it anyway.
Modified:
polly/trunk/lib/Transform/ZoneAlgo.cpp
Modified: polly/trunk/lib/Transform/ZoneAlgo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ZoneAlgo.cpp?rev=310454&r1=310453&r2=310454&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ZoneAlgo.cpp (original)
+++ polly/trunk/lib/Transform/ZoneAlgo.cpp Wed Aug 9 02:29:09 2017
@@ -353,16 +353,15 @@ bool ZoneAlgorithm::isCompatibleStmt(Sco
}
// 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()));
More information about the llvm-commits
mailing list