diff options
| author | Jin Huang <jinhuang1102@gmail.com> | 2025-11-21 11:17:28 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-21 11:17:28 -0800 |
| commit | ebb04b2b4c38e6bb7b6068f3474a8e8edf912f4d (patch) | |
| tree | 81c0c53112187ace9d546f60e879816da7e59165 /lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py | |
| parent | 1a29a2359b70f1bb4141324162dcfe4d27a6f026 (diff) | |
[profcheck] Propagate profile metadata to Wrapper function in optimize mode of ExpandVariadic. (#168161)
This PR fixes the issue where profile metadata (`!prof`) is dropped from
the `VariadicWrapper` when `ExpandVariadics` runs in
`--expand-variadics-override=optimize` mode.
In optimize mode, the pass splits the original variadic function into
two parts:
- A **VariadicWrapper** (retaining the original name) that handles the
`va_list` setup.
- A **FixedArityReplacement** (new function) that contains the original
core logic.
During this process, the basic blocks and associated metadata are
spliced into the `FixedArityReplacement`. Consequently, the
`VariadicWrapper`—which serves as the entry point for callers—is left
without function entry count metadata.
This change explicitly copies the `MD_prof` metadata from the
`FixedArityReplacement` back to the `VariadicWrapper` after the split is
defined.
Co-authored-by: Jin Huang <jingold@google.com>
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py')
0 files changed, 0 insertions, 0 deletions
