[llvm] [WPD]: Enable speculative devirtualizatoin. (PR #159048)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 28 06:43:43 PDT 2025
================
@@ -1325,10 +1367,10 @@ bool DevirtModule::trySingleImplDevirt(
if (!IsExported)
return false;
- // If the only implementation has local linkage, we must promote to external
- // to make it visible to thin LTO objects. We can only get here during the
- // ThinLTO export phase.
- if (TheFn->hasLocalLinkage()) {
+ // Out of speculative devirtualization mode, if the only implementation has
+ // local linkage, we must promote to external to make it visible to thin LTO
+ // objects.
+ if (!DevirtSpeculatively && TheFn->hasLocalLinkage()) {
----------------
hassnaaHamdi wrote:
I have added LTO flag. Please Let me know what do you think about it.
https://github.com/llvm/llvm-project/pull/159048
More information about the llvm-commits
mailing list