[llvm] [WPD]: Enable speculative devirtualizatoin. (PR #159048)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 12:50:51 PDT 2025
================
@@ -790,11 +812,22 @@ struct DevirtIndex {
PreservedAnalyses WholeProgramDevirtPass::run(Module &M,
ModuleAnalysisManager &MAM) {
if (UseCommandLine) {
- if (!DevirtModule::runForTesting(M, MAM))
+ if (!DevirtModule::runForTesting(M, MAM, ClDevirtualizeSpeculatively))
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
- if (!DevirtModule(M, MAM, ExportSummary, ImportSummary).run())
+
+ std::optional<ModuleSummaryIndex> Index;
+ if (!ExportSummary && !ImportSummary && DevirtSpeculatively) {
+ // Build the ExportSummary from the module.
+ assert(!ExportSummary &&
----------------
teresajohnson wrote:
This assert is redundant with the enclosing if condition
https://github.com/llvm/llvm-project/pull/159048
More information about the llvm-commits
mailing list