[PATCH] D156644: [BOLT][YAML] Only read first profile per function
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 30 21:45:19 PDT 2023
Amir created this revision.
Amir added a reviewer: bolt.
Herald added a reviewer: rafauler.
Herald added subscribers: treapster, ayermolo.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Work around the issue of multiple profiles per function.
Can happen with a stale profile which has separate profiles
that in a new binary got merged and became aliases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156644
Files:
bolt/lib/Profile/YAMLProfileReader.cpp
Index: bolt/lib/Profile/YAMLProfileReader.cpp
===================================================================
--- bolt/lib/Profile/YAMLProfileReader.cpp
+++ bolt/lib/Profile/YAMLProfileReader.cpp
@@ -344,8 +344,10 @@
continue;
yaml::bolt::BinaryFunctionProfile &YamlBF = *PI->getValue();
- if (profileMatches(YamlBF, Function))
+ if (profileMatches(YamlBF, Function)) {
matchProfileToFunction(YamlBF, Function);
+ break;
+ }
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156644.545508.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230731/8bf89c22/attachment.bin>
More information about the llvm-commits
mailing list