[PATCH] D51240: Add a flag to remap manglings when reading profile data information.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 24 16:38:25 PDT 2018
rsmith created this revision.
rsmith added reviewers: davidxl, tejohnson, dlj, erik.pilkington.
Herald added subscribers: dexonsmith, steven_wu, mgorny, mehdi_amini.
This can be used to preserve profiling information across codebase changes that have widespread impact on mangled names, but across which most profiling data should still be usable. For example, when switching from libstdc++ to libc++, or from the old libstdc++ ABI to the new ABI, or even from a 32-bit to a 64-bit build.
The user can provide a remapping file specifying parts of mangled names that should be treated as equivalent (eg, 'std::__1' should be treated as equivalent to 'std::__cxx11'), and profile data will be treated as applying to a particular function if its name is equivalent to the name of a function in the profile data under the provided equivalences. See the documentation change for a description of how this is configured.
Remapping is supported for both sample-based profiling and instruction profiling. We do not support remapping indirect branch target information, but all other profile data should be remapped appropriately.
Support is only added for the new pass manager. If someone wants to also add support for this for the old pass manager, doing so should be straightforward.
https://reviews.llvm.org/D51240
Files:
docs/ReleaseNotes.rst
docs/UsersManual.rst
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.h
include/llvm/LTO/Config.h
include/llvm/Passes/PassBuilder.h
include/llvm/ProfileData/InstrProfReader.h
include/llvm/ProfileData/ProfRemappingReader.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/Transforms/IPO/SampleProfile.h
include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CodeGenModule.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
lib/LTO/LTO.cpp
lib/LTO/LTOBackend.cpp
lib/Passes/PassBuilder.cpp
lib/ProfileData/CMakeLists.txt
lib/ProfileData/InstrProfReader.cpp
lib/ProfileData/ProfRemappingReader.cpp
lib/ProfileData/SampleProfReader.cpp
lib/Transforms/IPO/SampleProfile.cpp
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/CodeGenCXX/Inputs/profile-remap.map
test/CodeGenCXX/Inputs/profile-remap.proftext
test/CodeGenCXX/Inputs/profile-remap.samples
test/CodeGenCXX/profile-remap.cpp
test/Transforms/PGOProfile/Inputs/remap.map
test/Transforms/PGOProfile/Inputs/remap.proftext
test/Transforms/PGOProfile/remap.ll
test/Transforms/SampleProfile/Inputs/remap.map
test/Transforms/SampleProfile/Inputs/remap.prof
test/Transforms/SampleProfile/remap.ll
tools/opt/NewPMDriver.cpp
unittests/ProfileData/InstrProfTest.cpp
unittests/ProfileData/SampleProfTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51240.162500.patch
Type: text/x-patch
Size: 62543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180824/203d5d81/attachment-0001.bin>
More information about the cfe-commits
mailing list