1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Go to file
Hongtao Yu ba7bb5fc7d [CSSPGO] Overwrite branch weight annotated in previous pass.
Sample profile loader can be run in both LTO prelink and postlink. Currently the counts annoation in postilnk doesn't fully overwrite what's done in prelink. I'm adding a switch (`-overwrite-existing-weights=1`) to enable a full overwrite, which includes:

1. Clear old metadata for calls when their parent block has a zero count. This could be caused by prelink code duplication.

2. Clear indirect call metadata if somehow all the rest targets have a sum of zero count.

3. Overwrite branch weight for basic blocks.

With a CS profile, I was seeing #1 and #2 help reduce code size by preventing post-sample ICP and CGSCC inliner working on obsolete metadata, which come from a partial global inlining in prelink.  It's not expected to work well for non-CS case with a less-accurate post-inline count quality.

It's worth calling out that some prelink optimizations can damage counts quality in an irreversible way. One example is the loop rotate optimization. Due to lack of exact loop entry count (profiling can only give loop iteration count and loop exit count), moving one iteration out of the loop body leaves the rest iteration count unknown. We had to turn off prelink loop rotate to achieve a better postlink counts quality. A even better postlink counts quality can be archived by turning off prelink CGSCC inlining which is not context-sensitive.

Reviewed By: wenlei, wmi

Differential Revision: https://reviews.llvm.org/D102537
2021-05-19 09:12:24 -07:00
benchmarks
bindings Support unwinding from inline assembly 2021-05-13 19:13:03 +01:00
cmake Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04:00
docs [libfuzzer] Update doc mentioning removed flags. 2021-05-18 22:40:42 -07:00
examples [ORC] Update SpeculativeJIT example for dispatchTask changes in 5344c88dcb2. 2021-05-10 09:30:46 -07:00
include Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04:00
lib [CSSPGO] Overwrite branch weight annotated in previous pass. 2021-05-19 09:12:24 -07:00
projects llvmbuildectomy - replace llvm-build by plain cmake 2020-11-13 10:35:24 +01:00
resources
runtimes [runtimes] Add the libc project to the list of runtimes. 2021-03-23 17:33:03 +00:00
test [CSSPGO] Overwrite branch weight annotated in previous pass. 2021-05-19 09:12:24 -07:00
tools Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04:00
unittests [VP] make getFunctionalOpcode return an Optional 2021-05-19 17:08:34 +02:00
utils Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h 2021-05-19 11:15:07 -04: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 [flang][cmake] Enable the new driver by default 2021-05-11 09:16:29 +00:00
CODE_OWNERS.TXT [M68k][CODE_OWNERS](0/8) Add code owner for the M68k target 2021-03-08 12:30:56 -08:00
configure
CREDITS.TXT Update personal info in CREDITS.TXT 2021-04-11 19:25:02 +08:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

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.