diff options
author | Mingming Liu <mingmingl@google.com> | 2024-07-24 18:23:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-24 18:23:14 -0700 |
commit | ac1a1e5797388598201511d17f05aa088ef4a2e2 (patch) | |
tree | e30fae1f05de422c18ba3b312d3e0b9f8d76ffcf /lldb/source/Plugins/ScriptInterpreter/Python | |
parent | 2ba1aeed2efd8156717886f89f6d4270b1df7a18 (diff) | |
download | llvm-ac1a1e5797388598201511d17f05aa088ef4a2e2.zip llvm-ac1a1e5797388598201511d17f05aa088ef4a2e2.tar.gz llvm-ac1a1e5797388598201511d17f05aa088ef4a2e2.tar.bz2 |
[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.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions