[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.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.