Skip to content

Commit 2310c53

Browse files
author
Snehasish Kumar
committed
Address review comment: change ~0U to 1 for efficiency
1 parent a6283e7 commit 2310c53

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,9 +978,11 @@ static void addVPMetadata(Module &M, Instruction &I,
978978

979979
if (I.getMetadata(LLVMContext::MD_prof)) {
980980
uint64_t Unused;
981-
// ~0U means get all available value profile data without any count limit
981+
// TODO: When merging is implemented, increase this to a typical ICP value
982+
// (e.g., 3-6) For now, we only need to check if existing data exists, so 1
983+
// is sufficient
982984
auto ExistingVD = getValueProfDataFromInst(I, IPVK_IndirectCallTarget,
983-
/*MaxNumValueData=*/~0U, Unused);
985+
/*MaxNumValueData=*/1, Unused);
984986
// We don't know how to merge value profile data yet.
985987
if (!ExistingVD.empty()) {
986988
return;

0 commit comments

Comments
 (0)