[llvm] 7852351 - [CSSPGO] Do not use getCanonicalFnName in pseudo probe descriptor decoding

Hongtao Yu via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 10 18:27:11 PDT 2021


Author: Hongtao Yu
Date: 2021-08-10T18:24:39-07:00
New Revision: 78523516bc2a05a6467a7bcfd2ab04bb343d4797

URL: https://github.com/llvm/llvm-project/commit/78523516bc2a05a6467a7bcfd2ab04bb343d4797
DIFF: https://github.com/llvm/llvm-project/commit/78523516bc2a05a6467a7bcfd2ab04bb343d4797.diff

LOG: [CSSPGO] Do not use getCanonicalFnName in pseudo probe descriptor decoding

Pseudo probe descriptors are created very early in the pipeline where function names just come from the front end and are not yet decorated. So calling getCanonicalFnName on the function names in probe desc is basically a no-op, which also addes a depenency from MC to ProfileData unnessesarily.

Reviewed By: wenlei, wlei

Differential Revision: https://reviews.llvm.org/D107838

Added: 
    

Modified: 
    llvm/lib/MC/CMakeLists.txt
    llvm/lib/MC/MCPseudoProbe.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/CMakeLists.txt b/llvm/lib/MC/CMakeLists.txt
index 44a282c9cee62..811cee309e110 100644
--- a/llvm/lib/MC/CMakeLists.txt
+++ b/llvm/lib/MC/CMakeLists.txt
@@ -70,7 +70,6 @@ add_llvm_component_library(LLVMMC
   Support
   BinaryFormat
   DebugInfoCodeView
-  ProfileData
   )
 
 add_subdirectory(MCParser)

diff  --git a/llvm/lib/MC/MCPseudoProbe.cpp b/llvm/lib/MC/MCPseudoProbe.cpp
index 1e65cbf4acff8..4022f0707ba61 100644
--- a/llvm/lib/MC/MCPseudoProbe.cpp
+++ b/llvm/lib/MC/MCPseudoProbe.cpp
@@ -356,8 +356,7 @@ bool MCPseudoProbeDecoder::buildGUID2FuncDescMap(const uint8_t *Start,
 
     uint64_t GUID = std::move(*ErrorOrGUID);
     uint64_t Hash = std::move(*ErrorOrHash);
-    StringRef Name =
-        FunctionSamples::getCanonicalFnName(std::move(*ErrorOrName));
+    StringRef Name = std::move(*ErrorOrName);
 
     // Initialize PseudoProbeFuncDesc and populate it into GUID2FuncDescMap
     GUID2FuncDescMap.emplace(GUID, MCPseudoProbeFuncDesc(GUID, Hash, Name));


        


More information about the llvm-commits mailing list