[PATCH] D13961: [OperandBundles] Make function attributes conservatively correct

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 16:15:04 PDT 2015


sanjoy created this revision.
sanjoy added reviewers: reames, chandlerc.
sanjoy added a subscriber: llvm-commits.

This makes attribute accessors on `CallInst` and `InvokeInst` do the
(conservatively) right thing.  This essentially involves, in some
cases, *not* falling back querying the attributes on the called
`llvm::Function` when operand bundles are present.

Attributes locally present on the `CallInst` or `InvokeInst` will still
override operand bundle semantics.  The LangRef has been amended to
reflect this.  Note: this change does not do anything prevent
`-function-attrs` from inferring `CallSite` local attributes after
inspecting the called function -- that will be done as a separate
change.

I've used `-adce` and `-early-cse` to test these changes.  There is
nothing special about these passes (and they did not require any
changes) except that they seemed be the easiest way to write the tests.

This change does not add deal with `argmemonly`.  That's a later change
because alias analysis requires a related fix before `argmemonly` can be
tested.

http://reviews.llvm.org/D13961

Files:
  docs/LangRef.rst
  include/llvm/IR/InstrTypes.h
  include/llvm/IR/Instructions.h
  lib/IR/Instructions.cpp
  test/Feature/OperandBundles/adce.ll
  test/Feature/OperandBundles/early-cse.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13961.38060.patch
Type: text/x-patch
Size: 6833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151021/a436d685/attachment.bin>


More information about the llvm-commits mailing list