[PATCH] Allow call-slop optzn for destinations with a suitable dereferenceable attribute

Björn Steinbrink bsteinbr at gmail.com
Thu Oct 16 12:22:04 PDT 2014


Currently, call slot optimization requires that if the destination is an
argument, the argument has the sret attribute. This is to ensure that
the memory access won't trap. In addition to sret, we can also allow the
optimization to happen for arguments that have the new dereferenceable
attribute, which gives the same guarantee.

http://reviews.llvm.org/D5832

Files:
  lib/Transforms/Scalar/MemCpyOptimizer.cpp
  test/Transforms/MemCpyOpt/callslot_deref.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5832.15038.patch
Type: text/x-patch
Size: 3417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141016/68be3eec/attachment.bin>


More information about the llvm-commits mailing list