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
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))