[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 03:05:46 PDT 2025
================
@@ -1112,6 +1150,11 @@ bool DevirtModule::tryFindVirtualCallTargets(
// calls to pure virtuals are UB.
if (Fn->getName() == "__cxa_pure_virtual")
continue;
+ // In Most cases empty functions will be overridden by the
+ // implementation of the derived class, so we can skip them.
+ if (DevirtCheckMode == WPDCheckMode::Fallback &&
+ Fn->getReturnType()->isVoidTy() && Fn->getInstructionCount() <= 1)
----------------
hassnaaHamdi wrote:
refactored
https://github.com/llvm/llvm-project/pull/145031
More information about the llvm-commits
mailing list