1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Go to file
Reid Kleckner c18c30409c [PGO] Don't reference functions unless value profiling is enabled
This reduces the size of chrome.dll.pdb built with optimizations,
coverage, and line table info from 4,690,210,816 to 2,181,128,192, which
makes it possible to fit under the 4GB limit.

This change can greatly reduce binary size in coverage builds, which do
not need value profiling. IR PGO builds are unaffected. There is a minor
behavior change for frontend PGO.

PGO and coverage both use InstrProfiling to create profile data with
counters. PGO records the address of each function in the __profd_
global. It is used later to map runtime function pointer values back to
source-level function names. Coverage does not appear to use this
information.

Recording the address of every function with code coverage drastically
increases code size. Consider this program:

  void foo();
  void bar();
  inline void inlineMe(int x) {
    if (x > 0)
      foo();
    else
      bar();
  }
  int getVal();
  int main() { inlineMe(getVal()); }

With code coverage, the InstrProfiling pass runs before inlining, and it
captures the address of inlineMe in the __profd_ global. This greatly
increases code size, because now the compiler can no longer delete
trivial code.

One downside to this approach is that users of frontend PGO must apply
the -mllvm -enable-value-profiling flag globally in TUs that enable PGO.
Otherwise, some inline virtual method addresses may not be recorded and
will not be able to be promoted. My assumption is that this mllvm flag
is not popular, and most frontend PGO users don't enable it.

Differential Revision: https://reviews.llvm.org/D102818
2021-05-20 11:09:24 -07:00
benchmarks
bindings Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
cmake [CMake] Don't LTO optimize targets that aren't part of any distribution 2021-05-19 15:02:11 -07:00
docs Revert "[Debugify][Original DI] Test dbg var loc preservation" 2021-05-20 07:11:35 -07:00
examples [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2. 2021-05-10 09:30:46 -07:00
include [RISCV] Ensure shuffle splat operands are type-legal 2021-05-20 18:00:03 +01:00
lib [PGO] Don't reference functions unless value profiling is enabled 2021-05-20 11:09:24 -07:00
projects
resources
runtimes [runtimes] Add the libc project to the list of runtimes. 2021-03-23 17:33:03 +00:00
test [X86][Atom] Fix vector fadd/fcmp/fmul resource/throughputs 2021-05-20 18:56:58 +01:00
tools [llvm-strip] Add support for '--' for delimiting options from input files 2021-05-20 03:33:51 -07:00
unittests Revert "[Debugify][Original DI] Test dbg var loc preservation" 2021-05-20 07:11:35 -07:00
utils Revert "[Debugify][Original DI] Test dbg var loc preservation" 2021-05-20 07:11:35 -07:00
.clang-format
.clang-tidy
.gitattributes
.gitignore Remove .gitignore entries not relevant in the monorepo. 2021-04-07 12:25:02 -07:00
CMakeLists.txt [CMake] Don't LTO optimize targets that aren't part of any distribution 2021-05-19 15:02:11 -07:00
CODE_OWNERS.TXT
configure
CREDITS.TXT Update personal info in CREDITS.TXT 2021-04-11 19:25:02 +08:00
LICENSE.TXT
llvm.spec.in
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.