@@ -523,7 +523,7 @@ OutlinedInfoStruct CGIntrinsicsOpenMP::createOutlinedFunction(
523523 DEBUG_ENABLE (dbgs () << " === Dump OutlinedFn\n "
524524 << *OutlinedFn << " === End of Dump OutlinedFn\n " );
525525
526- if (verifyFunction (*OutlinedFn, &errs ()))
526+ if (DebugOpenMPFlag && verifyFunction (*OutlinedFn, &errs ()))
527527 FATAL_ERROR (" Verification of OutlinedFn failed!" );
528528
529529 CapturedVars.append (CapturedShared);
@@ -680,7 +680,7 @@ void CGIntrinsicsOpenMP::emitOMPParallelHostRuntime(
680680 DEBUG_ENABLE (dbgs () << " === Dump OuterFn\n "
681681 << *Fn << " === End of Dump OuterFn\n " );
682682
683- if (verifyFunction (*Fn, &errs ()))
683+ if (DebugOpenMPFlag && verifyFunction (*Fn, &errs ()))
684684 FATAL_ERROR (" Verification of OuterFn failed!" );
685685}
686686
@@ -756,7 +756,7 @@ void CGIntrinsicsOpenMP::emitOMPParallelDeviceRuntime(
756756 assert (OutlinedCI && " Expected valid call" );
757757 OMPBuilder.Builder .CreateRetVoid ();
758758
759- if (verifyFunction (*OutlinedWrapperFn, &errs ()))
759+ if (DebugOpenMPFlag && verifyFunction (*OutlinedWrapperFn, &errs ()))
760760 FATAL_ERROR (" Verification of OutlinedWrapperFn failed!" );
761761
762762 DEBUG_ENABLE (dbgs () << " === Dump OutlinedWrapper\n "
@@ -903,7 +903,7 @@ void CGIntrinsicsOpenMP::emitOMPParallelDeviceRuntime(
903903 DEBUG_ENABLE (dbgs () << " === Dump OuterFn\n "
904904 << *Fn << " === End of Dump OuterFn\n " );
905905
906- if (verifyFunction (*Fn, &errs ()))
906+ if (DebugOpenMPFlag && verifyFunction (*Fn, &errs ()))
907907 FATAL_ERROR (" Verification of OuterFn failed!" );
908908}
909909
@@ -1386,7 +1386,7 @@ void CGIntrinsicsOpenMP::emitLoop(DSAValueMapTy &DSAValueMap,
13861386 FATAL_ERROR (" Failed to create barrier: " + toString (std::move (E)));
13871387 }
13881388
1389- if (verifyFunction (*PreHeader->getParent (), &errs ()))
1389+ if (DebugOpenMPFlag && verifyFunction (*PreHeader->getParent (), &errs ()))
13901390 FATAL_ERROR (" Verification of omp for lowering failed!" );
13911391}
13921392
@@ -2542,7 +2542,7 @@ void CGIntrinsicsOpenMP::emitOMPTeamsDeviceRuntime(
25422542 DEBUG_ENABLE (dbgs () << " === Dump OuterFn\n "
25432543 << *Fn << " === End of Dump OuterFn\n " );
25442544
2545- if (verifyFunction (*Fn, &errs ()))
2545+ if (DebugOpenMPFlag && verifyFunction (*Fn, &errs ()))
25462546 FATAL_ERROR (" Verification of OuterFn failed!" );
25472547}
25482548
@@ -2626,7 +2626,7 @@ void CGIntrinsicsOpenMP::emitOMPTeamsHostRuntime(
26262626 DEBUG_ENABLE (dbgs () << " === Dump OuterFn\n "
26272627 << *Fn << " === End of Dump OuterFn\n " );
26282628
2629- if (verifyFunction (*Fn, &errs ()))
2629+ if (DebugOpenMPFlag && verifyFunction (*Fn, &errs ()))
26302630 FATAL_ERROR (" Verification of OuterFn failed!" );
26312631}
26322632
0 commit comments