[PATCH] D22204: Add getReturnedArgOperand to Call/InvokeInst, CallSite

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 10 14:28:14 PDT 2016


hfinkel created this revision.
hfinkel added reviewers: majnemer, chandlerc.
hfinkel added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

In order to make the optimizer smarter about using the 'returned' argument attribute (generally, but motivated by my llvm.noalias intrinsic work), add a utility function to Call/InvokeInst, and CallSite, to make it easy to get the returned call argument (when one exists).

P.S. There is already an unfortunate amount of code duplication between CallInst and InvokeInst, and this adds to it. We should probably clean that up separately.


http://reviews.llvm.org/D22204

Files:
  include/llvm/IR/Attributes.h
  include/llvm/IR/CallSite.h
  include/llvm/IR/Instructions.h
  lib/IR/Attributes.cpp
  lib/IR/Instructions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22204.63435.patch
Type: text/x-patch
Size: 4364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160710/39de12c0/attachment.bin>


More information about the llvm-commits mailing list