[PATCH] D16388: [PGO] Enable profile name compression

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 16:38:09 PST 2016

davidxl added a comment.

NameRef in V1 is IntPtr type (with different size between 32 and 64bit target), but in V2 it becomes uint64_t consistently. Yes will add coverage V2 testing (better as a follow up patch I think).

Comment at: include/llvm/ProfileData/InstrProfData.inc:164
@@ -162,1 +163,3 @@
+	           llvm::IndexedInstrProf::ComputeHash(NameValue)))
 COVMAP_FUNC_RECORD(const uint32_t, llvm::Type::getInt32Ty(Ctx), DataSize, \
good point. Will update.

Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:379
@@ +378,3 @@
+  if (ReferencedNames.empty())
+    return;
That means this module won't have data and counter (i.e, no emitted functions) sections either -- so there is no problem.

Comment at: lib/Transforms/Instrumentation/InstrProfiling.cpp:389
@@ +388,3 @@
+                                      llvm::GlobalValue::PrivateLinkage,
+                                      NamesVal, "__llvm_prf_nms");
+  NamesVar->setSection(getNameSection());
Ok to add ( I did not add it because this variable now strictly has internal linkage which runtime does not care about).


More information about the llvm-commits mailing list