[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 27 08:07:20 PDT 2024


================
@@ -985,7 +990,8 @@ void FunctionInstrumenter::instrument() {
         Intrinsic::getDeclaration(&M, PGOBlockCoverage
                                           ? Intrinsic::instrprof_cover
                                           : Intrinsic::instrprof_increment),
-        {Name, CFGHash, Builder.getInt32(NumCounters), Builder.getInt32(I++)});
+        {NormalizedNamePtr, CFGHash, Builder.getInt32(NumCounters),
+         Builder.getInt32(I++)});
----------------
qiongsiwu wrote:

Do we need to change the name used to profile the select instructions below as well? 

Specifically, for this line https://github.com/llvm/llvm-project/pull/102691/files#diff-618e0bf5dc7c44fae29843f3be69506a1b0a1409c7f018c61b0acf593f1c4605R998, should we use `NormalizedNamePtr` instead of `FuncInfo.FuncNameVar`? Maybe it does not matter but I'd like to understand if this is an explicit choice. 

Thanks so much! 

https://github.com/llvm/llvm-project/pull/102691


More information about the cfe-commits mailing list