Skip to content

Commit

Permalink
Only add verification passes in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pchintalapudi committed Mar 8, 2023
1 parent c3ec79f commit ecfda9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ namespace {

//Use for O1 and below
static void buildBasicPipeline(ModulePassManager &MPM, PassBuilder *PB, OptimizationLevel O, OptimizationOptions options) JL_NOTSAFEPOINT {
// #ifdef JL_DEBUG_BUILD
#ifdef JL_DEBUG_BUILD
addVerificationPasses(MPM, options.llvm_only);
// #endif
#endif
invokePipelineStartCallbacks(MPM, PB, O);
MPM.addPass(ConstantMergePass());
if (!options.dump_native) {
Expand Down Expand Up @@ -320,9 +320,9 @@ static void buildBasicPipeline(ModulePassManager &MPM, PassBuilder *PB, Optimiza

//Use for O2 and above
static void buildFullPipeline(ModulePassManager &MPM, PassBuilder *PB, OptimizationLevel O, OptimizationOptions options) JL_NOTSAFEPOINT {
// #ifdef JL_DEBUG_BUILD
#ifdef JL_DEBUG_BUILD
addVerificationPasses(MPM, options.llvm_only);
// #endif
#endif
invokePipelineStartCallbacks(MPM, PB, O);
MPM.addPass(ConstantMergePass());
{
Expand Down

0 comments on commit ecfda9f

Please sign in to comment.