This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Use internalized versions of non-exact functions
Needs ReviewPublic

Authored by jdoerfert on Jun 13 2019, 11:37 PM.

Details

Summary

As already described in 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 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 and D63317, tests will be added once an attribute is
deduced in the trunk.