[PATCH] D51895: Fix issues required to remove memset/memcpy/memmove special casing from AliasSetTracker

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 15:53:49 PDT 2018


reames created this revision.
reames added reviewers: anna, hfinkel, chandlerc, john.brawn, george.burgess.iv, davide, Prazek.
Herald added subscribers: llvm-commits, jfb, bollu, mcrosier.

The heart of this change is an NFC which removes dedicated handling in AST for handling mem* intrinsics in favour of the recently added generic argmemonly handling.

However, doing this exposed two deeper issues which are definitely not NFC:

1. We'd never sunk the handling for the atomic.elementwise variants down into MemoryLocation (which is the codepath used by the generic argmemonly work)
2. We weren't treating memmove as being writeonly in it's first argument.  This is really the change which concerns me.  (Note: memmove allows aliasing src and dest, but that doesn't allow the we can read *through* the dest argument which is how the parameter attributes are specified.)

Together, these two make the change mildly risky and I figured an extra set or two of eyes was definitely warranted.


Repository:
  rL LLVM

https://reviews.llvm.org/D51895

Files:
  include/llvm/Analysis/AliasSetTracker.h
  include/llvm/IR/Intrinsics.td
  lib/Analysis/AliasSetTracker.cpp
  lib/Analysis/MemoryLocation.cpp
  test/Analysis/AliasSet/memtransfer.ll
  test/Bitcode/upgrade-memory-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51895.164761.patch
Type: text/x-patch
Size: 4777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180910/3c0972e5/attachment.bin>


More information about the llvm-commits mailing list