diff options
-rw-r--r-- | llvm/lib/Transforms/IPO/OpenMPOpt.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp index e0e661b..6c22511 100644 --- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp +++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp @@ -2834,10 +2834,6 @@ struct AAKernelInfoFunction : AAKernelInfo { // to avoid other parts using the current constant value for simpliication. auto &OMPInfoCache = static_cast<OMPInformationCache &>(A.getInfoCache()); - // If we have disabled SPMD-ization, stop - if (DisableOpenMPOptSPMDization) - SPMDCompatibilityTracker.indicatePessimisticFixpoint(); - Function *Fn = getAnchorScope(); if (!OMPInfoCache.Kernels.count(Fn)) return; @@ -2976,6 +2972,9 @@ struct AAKernelInfoFunction : AAKernelInfo { dyn_cast<ConstantInt>(KernelInitCB->getArgOperand(InitIsSPMDArgNo)); if (IsSPMDArg && !IsSPMDArg->isZero()) SPMDCompatibilityTracker.indicateOptimisticFixpoint(); + // This is a generic region but SPMDization is disabled so stop tracking. + else if (DisableOpenMPOptSPMDization) + SPMDCompatibilityTracker.indicatePessimisticFixpoint(); } /// Modify the IR based on the KernelInfoState as the fixpoint iteration is |