================
@@ -240,27 +474,102 @@ IndirectCallPromoter::getPromotionCandidatesForCallSite(
     Ret.push_back(PromotionCandidate(TargetFunction, Count));
     TotalCount -= Count;
   }
+
   return Ret;
 }
 
+Constant *IndirectCallPromoter::getOrCreateVTableAddressPointVar(
+    GlobalVariable *GV, uint64_t AddressPointOffset) {
+  auto [Iter, Inserted] =
+      VTableAddressPointOffsetVal[GV].try_emplace(AddressPointOffset, nullptr);
+  if (Inserted)
+    Iter->second = getVTableAddressPointOffset(GV, AddressPointOffset);
+  return Iter->second;
+}
+
+Instruction *IndirectCallPromoter::computeVTableInfos(
----------------
minglotus-6 wrote:

Document output parameters and return value around class method declaration, 
and added more comments in the function (e.g., one example with detailed steps) 
as suggested.

https://github.com/llvm/llvm-project/pull/81442
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to