[llvm] [WPD]: Enable speculative devirtualizatoin. (PR #159048)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 08:24:10 PDT 2025
================
@@ -1329,10 +1363,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()) {
+ // If the only implementation has local linkage, we must promote
+ // to external to make it visible to thin LTO objects.
+ // This change should be safe only in LTO mode.
----------------
hassnaaHamdi wrote:
I have kept the original comment as the 'HasLocalSummary' is removed.
I will add your suggested comment when I add the flag again in a different patch.
https://github.com/llvm/llvm-project/pull/159048
More information about the llvm-commits
mailing list