[clang] [Clang] Disable verifier passes by default in NewPM CodeGen (PR #208178)

Alexis Engelke via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 02:28:10 PDT 2026


https://github.com/aengelke created https://github.com/llvm/llvm-project/pull/208178

By default, we shouldn't add expensive verifier passes to the pipeline.
This causes a substantial perf regression compared to the legacy PM.


>From df1de1b5a525299e06eebe51705a648c3f776605 Mon Sep 17 00:00:00 2001
From: Alexis Engelke <engelke at in.tum.de>
Date: Wed, 8 Jul 2026 09:27:09 +0000
Subject: [PATCH] [spr] initial version

Created using spr 1.3.8-wip
---
 clang/lib/CodeGen/BackendUtil.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index e33480f6c6416..f33026426e815 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -1301,6 +1301,7 @@ void EmitAssemblyHelper::RunCodegenPipelineNewPM(
   CGSCCAnalysisManager CGAM;
   ModuleAnalysisManager MAM;
   CGPassBuilderOption Opt = getCGPassBuilderOption();
+  Opt.DisableVerify = !CodeGenOpts.VerifyModule;
   MachineModuleInfo MMI(TM.get());
   PassInstrumentationCallbacks PIC;
   PipelineTuningOptions PTOptions;



More information about the cfe-commits mailing list