[PGOInstr] Add a debug print

llvm-svn: 308785
This commit is contained in:
Xinliang David Li 2017-07-21 21:36:25 +00:00
parent e4a89a6462
commit 8e43698cf1
1 changed files with 6 additions and 0 deletions

View File

@ -546,6 +546,12 @@ void FuncPGOInstrumentation<Edge, BBInfo>::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.