[all-commits] [llvm/llvm-project] ac1a1e: [ThinLTO][TypeProf] Import local-linkage global va...
Mingming Liu via All-commits
all-commits at lists.llvm.org
Wed Jul 24 18:23:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac1a1e5797388598201511d17f05aa088ef4a2e2
https://github.com/llvm/llvm-project/commit/ac1a1e5797388598201511d17f05aa088ef4a2e2
Author: Mingming Liu <mingmingl at google.com>
Date: 2024-07-24 (Wed, 24 Jul 2024)
Changed paths:
M compiler-rt/test/profile/Linux/instrprof-vtable-value-prof.cpp
M llvm/lib/Transforms/IPO/FunctionImport.cpp
Log Message:
-----------
[ThinLTO][TypeProf] Import local-linkage global var for mod1:func_foo-> mod2:local-var edge (#100448)
VTable value profiling can create reference edges from `mod1:func_foo`
to `mod2:local-vtable`. Indirect call profiling can create reference
edges from `mod1:func_foo` to `mod2:local_func_bar`.
Given a ref chain `mod1:func_foo -> mod2:local-var`,`local-var` doesn't
get imported by default.
Compiler checks / requires the module of 'local-var' is the same as the
function that referenced it(`mod1:func_foo`). This is to prevent
mis-compilation when both `mod1` and `mod2` has `local-var` of the same
name, and cpp files are compiled without full path.
This patch allows the import when one of the following conditions
happen:
1) Introduce an option `import-assume-local-unique`. When the compiler
user can guarantee that all files are compiled with full paths, they can
set this option.
2) When there is one instance of value summary.
Test:
* A/B testing this option alone gives -0.16% statistically consistent
cpu cycle reduction on one search workload (no throughput increase)
* Testing it together with existing more-efficient ICP bumps the
throughput increase by a margin (0.05%~0.1%)
* No regressions observed.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list