1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Go to file
Teresa Johnson b928562516 [TLI] Support for per-Function TLI that overrides available libfuncs
Summary:

Follow-on to D66428 and D71193, to build the TLI per-function so
that -fno-builtin* handling can be migrated to use function attributes.
See discussion on D61634 for background. This is an enabler for fixing
handling of these options for LTO, for example.

With D71193, the -fno-builtin* flags are converted to function
attributes, so we can now set this information per-function on the TLI.

In this patch, the TLI constructor is changed to take a Function, which
can be used to override the available builtins. The TLI is augmented
with an array that can be used to specify which builtins are not
available for the corresponding function. The available function checks
are changed to consult this override before checking the underlying
module level baseline TLII. New code is added to set this override
array based on the attributes.

I also removed the code that sets availability in the TLII in clang from
the options, which is no longer needed.

I removed a per-Triple caching of TLII objects in the analysis object,
as it is based on the Module's Triple which is the same for all
functions in any case. Is there a case where we would be compiling
multiple Modules with different Triples in one compilation?

Finally, I have changed the legacy analysis wrapper to create and use
the new PM analysis class (TargetLibraryAnalysis) in getTLI. This is
consistent with the behavior of getTTI for the legacy
TargetTransformInfo analysis. This change means that getTLI now creates
a new TLI on each call (although that should be very cheap as we cache
the module level TLII, and computing the per-function
attribute based availability should also be reasonably efficient).
I measured the compile time for a large C++ file with tens of thousands
of functions and as expected there was no increase.

Reviewers: chandlerc, hfinkel, gchatelet

Subscribers: mehdi_amini, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67923
2019-12-16 09:19:30 -08:00
benchmarks
bindings [llvm][bindings][go] Fix typo 2019-12-03 09:30:32 +01:00
cmake Don't call export_symbols.py with duplicate libs 2019-12-11 17:23:31 -05:00
docs Fix title underline in LangRef 2019-12-16 09:05:13 +01:00
examples [examples] Rename LLJITWithJITLink to LLJITWithCustomObjectLinkingLayer. 2019-12-15 21:57:11 -08:00
include [TLI] Support for per-Function TLI that overrides available libfuncs 2019-12-16 09:19:30 -08:00
lib [TLI] Support for per-Function TLI that overrides available libfuncs 2019-12-16 09:19:30 -08:00
projects
resources
runtimes
test [Bugpoint] Do not create illegal function attribute combos 2019-12-16 10:32:35 -06:00
tools [Bugpoint] Do not create illegal function attribute combos 2019-12-16 10:32:35 -06:00
unittests [llvm-exegesis][mips] Add SnippetGeneratorTest unit test 2019-12-16 16:50:03 +01:00
utils gn build: Merge 0add79aec2e 2019-12-16 16:00:52 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "[Examples] Add IRTransformations directory to examples." 2019-12-01 22:20:20 +00:00
CODE_OWNERS.TXT
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.