[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 4 10:56:25 PDT 2025


================
@@ -211,6 +220,14 @@ static cl::opt<WPDCheckMode> DevirtCheckMode(
                clEnumValN(WPDCheckMode::Fallback, "fallback",
                           "Fallback to indirect when incorrect")));
 
+// This pass runs mainly in lto mode, it can run in nonlto mode for limited
+// features. For testing, provide a way to tell that we are running in nonlto
+// mode.
+static cl::opt<bool>
+    TestNoLTOMode("wholeprogramdevirt-nolto", cl::Hidden,
----------------
teresajohnson wrote:

Change this one to indicate speculative devirtualization, and not be related to LTO status.

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


More information about the cfe-commits mailing list