diff options
author | Amir Ayupov <aaupov@fb.com> | 2024-04-11 21:07:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 21:07:36 +0200 |
commit | 8840992667180d327ff40ee24354ab8b49605aae (patch) | |
tree | 8419380ae71c2b43d053d08a31fcaf3ceee4ad62 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a5eaec83b3446f217169fdd94e03ec67823af058 (diff) | |
download | llvm-8840992667180d327ff40ee24354ab8b49605aae.zip llvm-8840992667180d327ff40ee24354ab8b49605aae.tar.gz llvm-8840992667180d327ff40ee24354ab8b49605aae.tar.bz2 |
[BOLT][BAT] Fix handling of split functions
Move BAT parent function lookup outside `getLocationName`, to the
scope where we retrieve `FuncBranchData` linked with the function.
Previously DataAggregator would store branch profile recorded in the
split fragment in `FuncBranchData` associated with the fragment, and
perform name translation in `getLocationName` for symbol name only.
This works for fdata profile which is printed out as-is, but doesn't
work with BAT YAML profile writer which requires a combined profile.
The issue necessitated `fixupBATProfile` which partially addressed the
issue (reassigned inter-fragment calls back into intra-function
branches). However, `fixupBATProfile` fails to address disjoint
profiles (i.e. doesn't merge `FuncBranchData` for fragments back
into parent). This diff eliminates the need for `fixupBATProfile` by
removing the root cause of the issue.
Test Plan: NFC for existing tests
Reviewers: ayermolo, dcci, rafaelauler, maksfb
Reviewed By: maksfb
Pull Request: https://github.com/llvm/llvm-project/pull/87569
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions