[PATCH] D63319: [Attributor] Use internalized versions of non-exact functions

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 23:38:55 PDT 2019


jdoerfert created this revision.
jdoerfert added reviewers: uenoku, sstefan1, homerdin, hfinkel, fedor.sergeev, chandlerc, nlopes, nicholas, arsenm, reames.
Herald added a project: LLVM.

As already described in D63312 <https://reviews.llvm.org/D63312>, ~67% of all function declarations in the
LLVM test suite and SPEC2006 are non-exact, thus they can be replaced at
link-time. D63312 <https://reviews.llvm.org/D63312> introduced shallow wrappers to allows self-recursive
deduction and the manifestation of attributes even in the case of
non-exact definitions. In this patch we go further and completely
replace the use of non-exact functions in a module by their internalized
version. This can come with increased cost, e.g., when the internalized
version is inlined in the wrapper, but it also allows to perform actual
inter-procedural reasoning.

The changes in the statistics output (>1%) for the LLVM-TS and SPEC2006
can be found here: https://gist.github.com/jdoerfert/fd70dd44a365f5c3c33ec856464cf1cb
There were multiple runtime performance improvements (~3-30%), some of
which came with compile time costs. I will provide more data once we
have attributes in the tree.

As with D63315 <https://reviews.llvm.org/D63315> and D63317 <https://reviews.llvm.org/D63317>, tests will be added once an attribute is
deduced in the trunk.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63319

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/Attributor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63319.204708.patch
Type: text/x-patch
Size: 6718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190614/5af135fa/attachment.bin>


More information about the llvm-commits mailing list