llvm-project
5fc6bc8a - [SampleProfile] Recover orphaned profiles inside imported code

Commit
22 hours ago
[SampleProfile] Recover orphaned profiles inside imported code An imported function can contain an orphaned inline frame without having its own top-level profile. Scan available callee bodies using their nested call-site profiles so on-demand loading also finds roots inside them. Cache each function/profile scan and each inline-frame lookup. Import does not copy pseudo-probe descriptors. Allow a missing descriptor when recovering a root, while still rejecting a known checksum mismatch. Also propagate import GUIDs through callers with unknown entry count -1, preserving that count rather than stopping at getEntryCount(). Add a pre-link/post-link regression covering an imported H without a root, a non-local R already inlined into H, missing imported descriptors, and forwarding hints through a caller without samples. Retain the call-count rejection case. The SampleProfile suite passes in Debug and Release. Adapted from be98486efe13fc (imported orphan-root prototype). Assisted-by: GPT-6 Astra
Author
Committer
Parents
Loading