anemet created this revision. anemet added reviewers: bogner, davidxl. anemet added a subscriber: cfe-commits.
Hopefully this will make it easier for the next person to figure all this out... http://reviews.llvm.org/D18489 Files: lib/CodeGen/CodeGenPGO.cpp Index: lib/CodeGen/CodeGenPGO.cpp =================================================================== --- lib/CodeGen/CodeGenPGO.cpp +++ lib/CodeGen/CodeGenPGO.cpp @@ -755,6 +755,14 @@ if (!ValuePtr || !ValueSite || !Builder.GetInsertBlock()) return; + // During instrumentation, function pointers are collected for the different + // indirect call targets. Then as part of the conversion from raw to merged + // profile data, these get replaced with md5 function name hashes. (This + // actually happens during deserialization of the raw profdata.) + // + // For this remapping the ProfData is used. ProfData contains both the + // function name hash and the function address. + bool InstrumentValueSites = CGM.getCodeGenOpts().hasProfileClangInstr(); if (InstrumentValueSites && RegionCounterMap) { llvm::LLVMContext &Ctx = CGM.getLLVMContext();
Index: lib/CodeGen/CodeGenPGO.cpp =================================================================== --- lib/CodeGen/CodeGenPGO.cpp +++ lib/CodeGen/CodeGenPGO.cpp @@ -755,6 +755,14 @@ if (!ValuePtr || !ValueSite || !Builder.GetInsertBlock()) return; + // During instrumentation, function pointers are collected for the different + // indirect call targets. Then as part of the conversion from raw to merged + // profile data, these get replaced with md5 function name hashes. (This + // actually happens during deserialization of the raw profdata.) + // + // For this remapping the ProfData is used. ProfData contains both the + // function name hash and the function address. + bool InstrumentValueSites = CGM.getCodeGenOpts().hasProfileClangInstr(); if (InstrumentValueSites && RegionCounterMap) { llvm::LLVMContext &Ctx = CGM.getLLVMContext();
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits