[polly] r287270 - [FIX] Do not try to hoist memory intrinsic
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 01:05:08 PST 2016
On Thu, Nov 17, 2016, at 11:11 PM, Johannes Doerfert via llvm-commits
wrote:
> Author: jdoerfert
> Date: Thu Nov 17 16:11:56 2016
> New Revision: 287270
>
> URL: http://llvm.org/viewvc/llvm-project?rev=287270&view=rev
> Log:
> [FIX] Do not try to hoist memory intrinsic
>
> Since we do not necessarily treat memory intrinsics as non-affine
> anymore, we have to check for them explicitly before we try to hoist an
> access.
Hi Johannes,
thanks for the fix! Would it be possible to add a test case or is this
hard for some reason?
Best,
Tobias
>
> Modified:
> polly/trunk/include/polly/ScopInfo.h
> polly/trunk/lib/Analysis/ScopInfo.cpp
>
> Modified: polly/trunk/include/polly/ScopInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopInfo.h?rev=287270&r1=287269&r2=287270&view=diff
> ==============================================================================
> --- polly/trunk/include/polly/ScopInfo.h (original)
> +++ polly/trunk/include/polly/ScopInfo.h Thu Nov 17 16:11:56 2016
> @@ -747,6 +747,11 @@ public:
> /// Is this a write memory access?
> bool isWrite() const { return isMustWrite() || isMayWrite(); }
>
> + /// Is this a memory intrinsic access (memcpy, memset, memmove)?
> + bool isMemoryIntrinsic() const {
> + return isa<MemIntrinsic>(getAccessInstruction());
> + }
> +
> /// Check if a new access relation was imported or set by a pass.
> bool hasNewAccessRelation() const { return NewAccessRelation; }
>
>
> Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=287270&r1=287269&r2=287270&view=diff
> ==============================================================================
> --- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
> +++ polly/trunk/lib/Analysis/ScopInfo.cpp Thu Nov 17 16:11:56 2016
> @@ -676,7 +676,7 @@ void MemoryAccess::assumeNoOutOfBound()
> }
>
> void MemoryAccess::buildMemIntrinsicAccessRelation() {
> - assert(isa<MemIntrinsic>(getAccessInstruction()));
> + assert(isMemoryIntrinsic());
> assert(Subscripts.size() == 2 && Sizes.size() == 1);
>
> auto *SubscriptPWA = getPwAff(Subscripts[0]);
> @@ -3487,7 +3487,8 @@ __isl_give isl_set *Scop::getNonHoistabl
> auto &Stmt = *Access->getStatement();
> BasicBlock *BB = Stmt.getEntryBlock();
>
> - if (Access->isScalarKind() || Access->isWrite() ||
> !Access->isAffine())
> + if (Access->isScalarKind() || Access->isWrite() || !Access->isAffine()
> ||
> + Access->isMemoryIntrinsic())
> return nullptr;
>
> // Skip accesses that have an invariant base pointer which is defined
> but
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list