[PATCH] D153486: [llvm-profdata] GUIDToFuncNameMap can be static
William Junda Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 16:57:01 PDT 2023
huangjd marked an inline comment as done.
huangjd added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:363
// Update GUIDToFuncNameMap for each function including inlinees.
- SetGUIDToFuncNameMapForAll(&CurrentGUIDToFuncNameMap);
+ FunctionSamples::GUIDToFuncNameMap = &CurrentGUIDToFuncNameMap;
}
----------------
hoy wrote:
> A static GUIDToFuncNameMap is shared across threads but here it's made to point to a module-local DS. This could be problematic. Also it cause race condition.
Changed it to thread_local
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153486/new/
https://reviews.llvm.org/D153486
More information about the llvm-commits
mailing list