[llvm] c566777 - [llvm-profgen] Fix a typo in collectProfiledFunctions
Hongtao Yu via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 1 16:52:47 PDT 2022
Author: Hongtao Yu
Date: 2022-11-01T16:52:39-07:00
New Revision: c566777818bc1c1da8543769134c62042212a289
URL: https://github.com/llvm/llvm-project/commit/c566777818bc1c1da8543769134c62042212a289
DIFF: https://github.com/llvm/llvm-project/commit/c566777818bc1c1da8543769134c62042212a289.diff
LOG: [llvm-profgen] Fix a typo in collectProfiledFunctions
As titled. The change should have minimal impact since the targets of branch samples are mostly covered by range samples.
Reviewed By: wenlei, wlei
Differential Revision: https://reviews.llvm.org/D137203
Added:
Modified:
llvm/tools/llvm-profgen/ProfileGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-profgen/ProfileGenerator.cpp b/llvm/tools/llvm-profgen/ProfileGenerator.cpp
index e111078243ea4..dd8f0691e5701 100644
--- a/llvm/tools/llvm-profgen/ProfileGenerator.cpp
+++ b/llvm/tools/llvm-profgen/ProfileGenerator.cpp
@@ -434,7 +434,7 @@ bool ProfileGeneratorBase::collectFunctionsFromRawProfile(
for (auto Item : CI.second.BranchCounter) {
uint64_t SourceAddress = Item.first.first;
- uint64_t TargetAddress = Item.first.first;
+ uint64_t TargetAddress = Item.first.second;
if (FuncRange *FRange = Binary->findFuncRange(SourceAddress))
ProfiledFunctions.insert(FRange->Func);
if (FuncRange *FRange = Binary->findFuncRange(TargetAddress))
More information about the llvm-commits
mailing list