[polly] r323618 - Change memcpy/memove/memset to have dest and source alignment attributes.
Daniel Neilson via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 28 10:13:58 PST 2018
Author: dneilson
Date: Sun Jan 28 10:13:57 2018
New Revision: 323618
URL: http://llvm.org/viewvc/llvm-project?rev=323618&view=rev
Log:
Change memcpy/memove/memset to have dest and source alignment attributes.
Summary:
This change is step four in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API.
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead.
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.
Reference
http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html
Reviewers: jdoerfert, grosser, bollu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41677
Modified:
polly/trunk/include/polly/Support/ScopHelper.h
Modified: polly/trunk/include/polly/Support/ScopHelper.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/Support/ScopHelper.h?rev=323618&r1=323617&r2=323618&view=diff
==============================================================================
--- polly/trunk/include/polly/Support/ScopHelper.h (original)
+++ polly/trunk/include/polly/Support/ScopHelper.h Sun Jan 28 10:13:57 2018
@@ -198,8 +198,11 @@ public:
return asLoad()->getAlignment();
if (isStore())
return asStore()->getAlignment();
+ if (isMemTransferInst())
+ return std::min(asMemTransferInst()->getDestAlignment(),
+ asMemTransferInst()->getSourceAlignment());
if (isMemIntrinsic())
- return asMemIntrinsic()->getAlignment();
+ return asMemIntrinsic()->getDestAlignment();
if (isCallInst())
return 0;
llvm_unreachable("Operation not supported on nullptr");
More information about the llvm-commits
mailing list