The stats are computed per module and will all be merged in the binary, importing the metadata will cause duplication of the stats.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Paths
| Differential D138833
[llvm_stats] Do not import llvm.stats metadata for thinlto ClosedPublic Authored by wlei on Nov 28 2022, 10:07 AM.
Details Summary The stats are computed per module and will all be merged in the binary, importing the metadata will cause duplication of the stats.
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Nov 28 2022, 11:44 AM Closed by commit rGef0cb372dc80: [llvm_stats] Do not import llvm.stats metadata for thinlto (authored by wlei). · Explain WhyNov 28 2022, 4:47 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 478275 llvm/include/llvm/IR/Metadata.h
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/ThinLTO/X86/Inputs/llvm-stats-import.ll
llvm/test/ThinLTO/X86/llvm-stats-import.ll
|
I'm not sure this is a good place to define the constant and I don't see any other good place for it either. Maybe just leave "llvm.stats" in place? "llvm.dbg.cu" is an example.