Skip to content

[Clang] Disable verifier passes by default in NewPM CodeGen#208178

Merged
aengelke merged 1 commit into
mainfrom
users/aengelke/spr/clang-disable-verifier-passes-by-default-in-newpm-codegen
Jul 8, 2026
Merged

[Clang] Disable verifier passes by default in NewPM CodeGen#208178
aengelke merged 1 commit into
mainfrom
users/aengelke/spr/clang-disable-verifier-passes-by-default-in-newpm-codegen

Conversation

@aengelke

@aengelke aengelke commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

Created using spr 1.3.8-wip
@llvmorg-github-actions llvmorg-github-actions Bot added clang Clang issues not falling into any other category clang:codegen IR generation bugs: mangling, exceptions, etc. labels Jul 8, 2026
@llvmorg-github-actions

llvmorg-github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-codegen

Author: Alexis Engelke (aengelke)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/208178.diff

1 Files Affected:

  • (modified) clang/lib/CodeGen/BackendUtil.cpp (+1)
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;

@boomanaiden154 boomanaiden154 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@aengelke aengelke merged commit 38aa43f into main Jul 8, 2026
14 checks passed
@aengelke aengelke deleted the users/aengelke/spr/clang-disable-verifier-passes-by-default-in-newpm-codegen branch July 8, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:codegen IR generation bugs: mangling, exceptions, etc. clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants