[PATCH] D137203: [llvm-profgen] Fix a typo in collectProfiledFunctions

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 15:18:29 PDT 2022


hoy created this revision.
Herald added subscribers: modimo, wenlei.
Herald added a project: All.
hoy requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As titled. The change should have minimal impact since the targets of branch samples are mostly covered by range samples.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137203

Files:
  llvm/tools/llvm-profgen/ProfileGenerator.cpp


Index: llvm/tools/llvm-profgen/ProfileGenerator.cpp
===================================================================
--- llvm/tools/llvm-profgen/ProfileGenerator.cpp
+++ llvm/tools/llvm-profgen/ProfileGenerator.cpp
@@ -434,7 +434,7 @@
 
     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))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137203.472429.patch
Type: text/x-patch
Size: 627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221101/953314b1/attachment.bin>


More information about the llvm-commits mailing list