[PATCH] InstCombine: propagate deref via new addDereferenceableAttr

Ramkumar Ramachandra artagnon at gmail.com
Mon Feb 9 09:54:10 PST 2015


Hi hfinkel, echristo, sanjoy, reames,

The "dereferenceable" attribute cannot be added via .addAttribute(),
since it also expects a size in bytes. AttrBuilder#addAttribute or
AttributeSet#addAttribute is wrapped by classes Function, InvokeInst,
and CallInst. Add corresponding wrappers to
AttrBuilder#addDereferenceableAttr.

Having done this, propagate the dereferenceable attribute via
gc.relocate, adding a test to exercise it. Note that -datalayout is
required during execution over and above -instcombine, because
InstCombine only optionally requires DataLayoutPass.

http://reviews.llvm.org/D7510

Files:
  include/llvm/IR/Attributes.h
  include/llvm/IR/Function.h
  include/llvm/IR/Instructions.h
  lib/IR/Attributes.cpp
  lib/IR/Function.cpp
  lib/IR/Instructions.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  test/Transforms/InstCombine/gc.relocate.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7510.19595.patch
Type: text/x-patch
Size: 6836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150209/2d96d475/attachment.bin>


More information about the llvm-commits mailing list