[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

David Li via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 15:44:00 PDT 2024


================
@@ -1967,11 +1969,23 @@ void llvm::updateProfileCallee(
     uint64_t CloneEntryCount = PriorEntryCount - NewEntryCount;
     for (auto Entry : *VMap) {
       if (isa<CallInst>(Entry.first))
-        if (auto *CI = dyn_cast_or_null<CallInst>(Entry.second))
+        if (auto *CI = dyn_cast_or_null<CallInst>(Entry.second)) {
----------------
david-xl wrote:

If the tryGetVTableInstuction can handle non-call/invoke instruction (returns null), then the code duplication can be avoided.

https://github.com/llvm/llvm-project/pull/81442


More information about the cfe-commits mailing list