llvm-project/llvm
Chandler Carruth 05ca5acc9e [PM] Introduce a devirtualization iteration layer for the new PM.
This is an orthogonal and separated layer instead of being embedded
inside the pass manager. While it adds a small amount of complexity, it
is fairly minimal and the composability and control seems worth the
cost.

The logic for this ends up being nicely isolated and targeted. It should
be easy to experiment with different iteration strategies wrapped around
the CGSCC bottom-up walk using this kind of facility.

The mechanism used to track devirtualization is the simplest one I came
up with. I think it handles most of the cases the existing iteration
machinery handles, but I haven't done a *very* in depth analysis. It
does however match the basic intended semantics, and we can tweak or
tune its exact behavior incrementally as necessary. One thing that we
may want to revisit is freshly building the value handle set on each
iteration. While I don't think this will be a significant cost (it is
strictly fewer value handles but more churn of value handes than the old
call graph), it is conceivable that we'll want a somewhat more clever
tracking mechanism. My hope is to layer that on as a follow up patch
with data supporting any implementation complexity it adds.

This code also provides for a basic count heuristic: if the number of
indirect calls decreases and the number of direct calls increases for
a given function in the SCC, we assume devirtualization is responsible.
This matches the heuristics currently used in the legacy pass manager.

Differential Revision: https://reviews.llvm.org/D23114

llvm-svn: 290665
2016-12-28 11:07:33 +00:00
..
bindings Fix go bindings after r289702 (hopefully, don't really know how to build 2016-12-15 06:54:29 +00:00
cmake Enable '-Wstring-conversion' and fix some bad asserts that it helped 2016-12-23 01:38:06 +00:00
docs [doc] Add mention of the difference in optimization level between Release and RelWithDebInfo in Cmake.rst 2016-12-26 23:42:12 +00:00
examples BrainF example: fixing segfault caused by outdated code with missing MCJIT dependency 2016-12-15 19:29:42 +00:00
include [PM] Introduce a devirtualization iteration layer for the new PM. 2016-12-28 11:07:33 +00:00
lib [PM] Introduce a devirtualization iteration layer for the new PM. 2016-12-28 11:07:33 +00:00
projects
resources
runtimes [CMake] Multi-target builtins build 2016-12-12 23:15:10 +00:00
test [PM] Introduce a devirtualization iteration layer for the new PM. 2016-12-28 11:07:33 +00:00
tools llvm-readobj: ELF: Make DT tags machine aware 2016-12-27 19:59:29 +00:00
unittests [PM] Teach the CGSCC's CG update utility to more carefully invalidate 2016-12-28 10:34:50 +00:00
utils Mark comparator call operator as const 2016-12-27 23:15:58 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore [AVR] Add the integrated testing tool to the .gitignore 2016-12-14 11:47:14 +00:00
CMakeLists.txt Build KillTheDoctor with mingw-w64 2016-12-22 19:11:42 +00:00
CODE_OWNERS.TXT CODE_OWNERS: Take ownership of IR Linker as discussed on llvm-dev 2016-12-02 14:06:53 +00:00
CREDITS.TXT Revert revision 289721. 2016-12-14 21:58:42 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.