[PATCH] D116051: [InstrProf] Prevent duplicate functions in correlated data
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 20 13:49:34 PST 2021
ellis added a comment.
In D116051#3203500 <https://reviews.llvm.org/D116051#3203500>, @kyulee wrote:
> I presume without debug-info related correlation (normal IRPGO), the metadata is merged by their linkage types/contents.
> For my education, I wonder whether IRPGO might have the same named function with different different CFG shapes -- e.g., static functions.
> This approach seems to pick the first appearance of metadata for the same named functions, and ignore the rest assuming they are all identical.
IRPGO uses `GlobalValue::getGlobalIdentifier()` as the function name, which will prepend the filename if necessary. https://llvm.org/doxygen/Globals_8cpp_source.html#l00133
I suppose it might be more accurate to track the counter pointers and add an assert that if there are two entries with the same counter pointer, then they must have the same function name.
> And also can we have a test case for this?
I can try to find a reproducer, but I assume it would require more than one module.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116051/new/
https://reviews.llvm.org/D116051
More information about the llvm-commits
mailing list