[PATCH] D43081: [AlignmentFromAssumptions] Set source and dest alignments of memory intrinsiscs separately

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 10:52:53 PST 2018


dneilson created this revision.
dneilson added a reviewer: hfinkel.
Herald added a reviewer: bollu.

This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
AlignmentFromAssumptions pass to cease using the old getAlignment()/setAlignment API of
MemoryIntrinsic in favour of getting/setting source & dest specific alignments through
the new API. This allows us to simplify some of the code in this pass and also be more
aggressive about setting the source and destination alignments separately.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( https://reviews.llvm.org/rL322965, https://reviews.llvm.org/rC322964, https://reviews.llvm.org/rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( https://reviews.llvm.org/rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( https://reviews.llvm.org/rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( https://reviews.llvm.org/rL323618 )
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. ( https://reviews.llvm.org/rL323886, https://reviews.llvm.org/rL323891, https://reviews.llvm.org/rL324148, https://reviews.llvm.org/rL324273, https://reviews.llvm.org/rL324278,
https://reviews.llvm.org/rL324384, https://reviews.llvm.org/rL324395, https://reviews.llvm.org/rL324402, https://reviews.llvm.org/rL324626 )
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


Repository:
  rL LLVM

https://reviews.llvm.org/D43081

Files:
  include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h
  lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
  test/Transforms/AlignmentFromAssumptions/simple.ll
  test/Transforms/AlignmentFromAssumptions/simple32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43081.133449.patch
Type: text/x-patch
Size: 5410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180208/8097f98f/attachment.bin>


More information about the llvm-commits mailing list