From: Hongtao Yu Date: Tue, 1 Nov 2022 22:17:57 +0000 (-0700) Subject: [llvm-profgen] Fix a typo in collectProfiledFunctions X-Git-Tag: upstream/17.0.6~28797 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c566777818bc1c1da8543769134c62042212a289;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/llvm/tools/llvm-profgen/ProfileGenerator.cpp b/llvm/tools/llvm-profgen/ProfileGenerator.cpp index e111078..dd8f069 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))