[PATCH] D153486: [llvm-profdata] GUIDToFuncNameMap can be static
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 23 09:46:15 PDT 2023
hoy added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:362
// Update GUIDToFuncNameMap for each function including inlinees.
+ FunctionSamples::GUIDToFuncNameMap = &CurrentGUIDToFuncNameMap;
----------------
nit: please update the comment. The update is per-module now.
Also it might be better to just move this out of the constructor into `SampleProfileLoader::runOnModule`. The container `CurrentGUIDToFuncNameMap` here is basically a ref to `GUIDToFuncNameMap` of `SampleProfileLoader`.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:372
// Reset GUIDToFuncNameMap for of each function as they're no
// longer valid at this point.
----------------
Please update the comment and mov it out to `SampleProfileLoader::runOnModule` too.
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