[all-commits] [llvm/llvm-project] 0f5254: [CGData][MachineOutliner] Global Outlining (#90074)
Kyungwoo Lee via All-commits
all-commits at lists.llvm.org
Tue Sep 10 06:56:54 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f525452896771cc8c579eb362dc7645e38fd0b9
https://github.com/llvm/llvm-project/commit/0f525452896771cc8c579eb362dc7645e38fd0b9
Author: Kyungwoo Lee <kyulee at meta.com>
Date: 2024-09-10 (Tue, 10 Sep 2024)
Changed paths:
M llvm/include/llvm/ADT/StableHashing.h
M llvm/include/llvm/CodeGen/MachineOutliner.h
M llvm/lib/CGData/CodeGenData.cpp
M llvm/lib/CodeGen/CMakeLists.txt
M llvm/lib/CodeGen/MachineOutliner.cpp
M llvm/test/CodeGen/AArch64/O3-pipeline.ll
A llvm/test/CodeGen/AArch64/cgdata-global-hash.ll
A llvm/test/CodeGen/AArch64/cgdata-outlined-name.ll
A llvm/test/CodeGen/AArch64/cgdata-read-double-outline.ll
A llvm/test/CodeGen/AArch64/cgdata-read-lto-outline.ll
A llvm/test/CodeGen/AArch64/cgdata-read-priority.ll
A llvm/test/CodeGen/AArch64/cgdata-read-single-outline-suffix.ll
A llvm/test/CodeGen/AArch64/cgdata-read-single-outline.ll
A llvm/test/CodeGen/AArch64/cgdata-write-outline.ll
M llvm/test/CodeGen/RISCV/O3-pipeline.ll
M llvm/unittests/MIR/MachineStableHashTest.cpp
Log Message:
-----------
[CGData][MachineOutliner] Global Outlining (#90074)
This commit introduces support for outlining functions across modules
using codegen data generated from previous codegen. The codegen data
currently manages the outlined hash tree, which records outlining
instances that occurred locally in the past.
The machine outliner now operates in one of three modes:
1. CGDataMode::None: This is the default outliner mode that uses the
suffix tree to identify (local) outlining candidates within a module.
This mode is also used by (full)LTO to maintain optimal behavior with
the combined module.
2. CGDataMode::Write (`-codegen-data-generate`): This mode is identical
to the default mode, but it also publishes the stable hash sequences of
instructions in the outlined functions into a local outlined hash tree.
It then encodes this into the `__llvm_outline` section, which will be
dead-stripped at link time.
3. CGDataMode::Read (`-codegen-data-use-path={.cgdata}`): This mode
reads a codegen data file (.cgdata) and initializes a global outlined
hash tree. This tree is used to generate global outlining candidates.
Note that the codegen data file has been post-processed with the raw
`__llvm_outline` sections from all native objects using the
`llvm-cgdata` tool (or a linker, `LLD`, or a new ThinLTO pipeline
later).
This depends on https://github.com/llvm/llvm-project/pull/105398. After
this PR, LLD (https://github.com/llvm/llvm-project/pull/90166) and Clang
(https://github.com/llvm/llvm-project/pull/90304) will follow for each
client side support.
This is a patch for
https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-2-thinlto-nolto/78753.
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