[PATCH] D19470: [TLI] Unify LibFunc attribute inference. NFCI.

Ahmed Bougacha via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 24 12:49:37 PDT 2016


ab created this revision.
ab added reviewers: joker.eph, spatel, echristo.
ab added a subscriber: llvm-commits.
Herald added a subscriber: joker.eph.

Now the pass is just a tiny wrapper around the util. This lets us reuse the logic elsewhere (done here for BuildLibCalls) instead of duplicating it.

I put it in BuildLibCalls.h. I think the next step is to have something like getOrInsertLibFunc that also sets the attributes.
I tried having this in TLI itself, but that doesn't feel right for an analysis.  I also tried having the analysis return an AttributeSet that users would then apply; I think that's still a little awkward though. Thoughts?

http://reviews.llvm.org/D19470

Files:
  include/llvm/Transforms/Utils/BuildLibCalls.h
  lib/Transforms/IPO/InferFunctionAttrs.cpp
  lib/Transforms/Utils/BuildLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19470.54808.patch
Type: text/x-patch
Size: 58760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160424/b652cf03/attachment.bin>


More information about the llvm-commits mailing list