[all-commits] [llvm/llvm-project] 82956d: [SampleFDO] Fix a bug when appending function symb...
wmi-11 via All-commits
all-commits at lists.llvm.org
Tue May 4 10:06:39 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 82956de05f9d63e5fbc170702649e5d978b51b80
https://github.com/llvm/llvm-project/commit/82956de05f9d63e5fbc170702649e5d978b51b80
Author: Wei Mi <wmi at google.com>
Date: 2021-05-04 (Tue, 04 May 2021)
Changed paths:
M llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
Log Message:
-----------
[SampleFDO] Fix a bug when appending function symbol into the Callees set of
Root node in ProfiledCallGraph.
In ProfiledCallGraph::addProfiledFunction, to add a function symbol into the
ProfiledCallGraph, currently an uninitialized ProfiledCallGraphNode node is
created by ProfiledFunctions[Name] and inserted into Callees set of Root node
before the node is initialized. The Callees set use
ProfiledCallGraphNodeComparer as its comparator so the uninitialized
ProfiledCallGraphNode may fail to be inserted into Callees set if it happens
to contain a name in memory which has been inserted into the Callees set
before. The problem will prevent some function symbols from being annotated
with profiles and cause performance regression. The patch fixes the problem.
Differential Revision: https://reviews.llvm.org/D101815
More information about the All-commits
mailing list