This commit cleans up some parts of the PGO instrumentation. Most
importantly, it removes a template parameter shadowing of a class name
that could lead to confusion.
Details
- Reviewers
gysit - Commits
- rGd8e15dc4ae90: [PGO] Minor instrumentation code cleanup (NFC)
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The CI crash is caused by another change in bolt that only occurs sporadically. Potential causing revision: https://reviews.llvm.org/D149014
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
725 | I'm seeing a test failure on test/Transforms/PGOProfile/comdat_rename.ll in our internal buils, that bisects to this patch: error: CHECK: expected string not found in input ; CHECK: @f = weak alias void (), ptr @f.[[SINGLEBB_HASH]] ^ <stdin>:15:37: note: scanning from here $aef.742261418966908927 = comdat any ^ <stdin>:15:37: note: with "SINGLEBB_HASH" equal to "742261418966908927" $aef.742261418966908927 = comdat any ^ <stdin>:30:2: note: possible intended match here @"\CD" = weak alias void (), ptr @f.742261418966908927 ^ Unfortunately, I haven't been able to reproduce in my clone of upstream sources so I don't have any easy repro instructions yet. Turning OrigName back into a std::string fixes the problem for me, and I believe (but haven't confirmed yet) that the problem comes because OrigName is now a reference to F.getName(), but then we call F.setName() and invalidate the reference before calling GlobalAlias::create. Possibly the debug standard library in my failing build is writing 0xCD into the deleted buffer to mark it as invalid, causing the @f/@"\CD" mismatch reported by the test. |
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
725 | Sorry for the inconvenience and thanks for hunting down the bug. Should be fixed in https://reviews.llvm.org/rGc67079f1be713fa558b3773562bd1eeb156cadbd |
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | ||
---|---|---|
725 | Thank you! |
I'm seeing a test failure on test/Transforms/PGOProfile/comdat_rename.ll in our internal buils, that bisects to this patch:
Unfortunately, I haven't been able to reproduce in my clone of upstream sources so I don't have any easy repro instructions yet. Turning OrigName back into a std::string fixes the problem for me, and I believe (but haven't confirmed yet) that the problem comes because OrigName is now a reference to F.getName(), but then we call F.setName() and invalidate the reference before calling GlobalAlias::create. Possibly the debug standard library in my failing build is writing 0xCD into the deleted buffer to mark it as invalid, causing the @f/@"\CD" mismatch reported by the test.