[clang] [clang][codegen] Add a verifier IR pass before any further passes. (PR #68015)
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 12:06:22 PDT 2023
================
@@ -923,6 +923,8 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
ModulePassManager MPM;
+ // Add a verifier pass, before any other passes, to catch CodeGen issues.
+ MPM.addPass(VerifierPass());
----------------
rjmccall wrote:
I agree that it's valuable to do verification right out of IR generation, but the verifier pass is pretty heavyweight, and I don't think we want to be doing it unconditionally in release builds. There's a reason there's an option to enable/disable it.
https://github.com/llvm/llvm-project/pull/68015
More information about the cfe-commits
mailing list