[PATCH] D70714: [Attributor] Deduce dereferenceable based on accessed bytes map

Hideto Ueno via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 05:28:42 PST 2019


uenoku created this revision.
uenoku added reviewers: jdoerfert, spatel, hfinkel, RKSimon, sstefan1.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

This patch introduces the deduction based on load/store instructions whose pointer operand is a non-inbounds GEP instruction. 
For example if we have,

  void f(int *u){
   u[0] = 0;
   u[1] = 1;
   u[2] = 2;
  }

then u must be dereferenceable(12).

This patch is inspired by D64258 <https://reviews.llvm.org/D64258>


https://reviews.llvm.org/D70714

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/test/Transforms/FunctionAttrs/align.ll
  llvm/test/Transforms/InferFunctionAttrs/dereferenceable.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70714.231053.patch
Type: text/x-patch
Size: 14319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191126/03a96811/attachment.bin>


More information about the llvm-commits mailing list