[polly] r365470 - OpaquePtr: Update polly's calls to Loads.h API
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 05:13:31 PDT 2019
Author: tnorthover
Date: Tue Jul 9 05:13:31 2019
New Revision: 365470
URL: http://llvm.org/viewvc/llvm-project?rev=365470&view=rev
Log:
OpaquePtr: Update polly's calls to Loads.h API
The Loads.h API changed so that a Type parameter is now mandatory in
preparation for pointer types being opaque. Unfortunately I don't build
polly routinely and it still had some uses. This just provides the
(obvious) load type in each case.
Modified:
polly/trunk/lib/Analysis/ScopBuilder.cpp
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopBuilder.cpp?rev=365470&r1=365469&r2=365470&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopBuilder.cpp (original)
+++ polly/trunk/lib/Analysis/ScopBuilder.cpp Tue Jul 9 05:13:31 2019
@@ -1435,8 +1435,8 @@ isl::set ScopBuilder::getNonHoistableCtx
isl::set SafeToLoad;
auto &DL = scop->getFunction().getParent()->getDataLayout();
- if (isSafeToLoadUnconditionally(LI->getPointerOperand(), LI->getAlignment(),
- DL)) {
+ if (isSafeToLoadUnconditionally(LI->getPointerOperand(), LI->getType(),
+ LI->getAlignment(), DL)) {
SafeToLoad = isl::set::universe(AccessRelation.get_space().range());
} else if (BB != LI->getParent()) {
// Skip accesses in non-affine subregions as they might not be executed
@@ -1487,6 +1487,7 @@ bool ScopBuilder::canAlwaysBeHoisted(Mem
// TODO: We can provide more information for better but more expensive
// results.
if (!isDereferenceableAndAlignedPointer(LInst->getPointerOperand(),
+ LInst->getType(),
LInst->getAlignment(), DL))
return false;
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=365470&r1=365469&r2=365470&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Tue Jul 9 05:13:31 2019
@@ -468,7 +468,8 @@ bool ScopDetection::onlyValidRequiredInv
for (auto NonAffineRegion : Context.NonAffineSubRegionSet) {
if (isSafeToLoadUnconditionally(Load->getPointerOperand(),
- Load->getAlignment(), DL))
+ Load->getType(), Load->getAlignment(),
+ DL))
continue;
if (NonAffineRegion->contains(Load) &&
More information about the llvm-commits
mailing list