From: Xinliang David Li Date: Fri, 21 Jul 2017 21:36:25 +0000 (+0000) Subject: [PGOInstr] Add a debug print X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b189b913534ef7e7a00f4ff0f47ea547f9e406a7;p=llvm [PGOInstr] Add a debug print git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308785 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 087ba4d8040..ef955f17bfa 100644 --- a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -546,6 +546,12 @@ void FuncPGOInstrumentation::computeCFGHash() { FunctionHash = (uint64_t)SIVisitor.getNumOfSelectInsts() << 56 | (uint64_t)ValueSites[IPVK_IndirectCallTarget].size() << 48 | (uint64_t)MST.AllEdges.size() << 32 | JC.getCRC(); + DEBUG(dbgs() << "Function Hash Computation for " << F.getName() << ":\n" + << " CRC = " << JC.getCRC() + << ", Selects = " << SIVisitor.getNumOfSelectInsts() + << ", Edges = " << MST.AllEdges.size() + << ", ICSites = " << ValueSites[IPVK_IndirectCallTarget].size() + << ", Hash = " << FunctionHash << "\n";); } // Check if we can safely rename this Comdat function.