[llvm] 8e12451 - [OpenMP][FIX] Ensure not to dereference a nullptr
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 22 20:06:36 PST 2023
Author: Johannes Doerfert
Date: 2023-01-22T20:06:23-08:00
New Revision: 8e124515cdd628a4d147bf10497ecbb537964e0b
URL: https://github.com/llvm/llvm-project/commit/8e124515cdd628a4d147bf10497ecbb537964e0b
DIFF: https://github.com/llvm/llvm-project/commit/8e124515cdd628a4d147bf10497ecbb537964e0b.diff
LOG: [OpenMP][FIX] Ensure not to dereference a nullptr
Added:
Modified:
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index 95f7ce01441e1..dee2ee2bb3ead 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -2809,7 +2809,8 @@ ChangeStatus AAExecutionDomainFunction::updateImpl(Attributor &A) {
ED.IsReachedFromAlignedBarrierOnly = true;
// Aligned barrier collection has to come last.
ED.clearAssumeInstAndAlignedBarriers();
- ED.addAlignedBarrier(A, *CB);
+ if (CB)
+ ED.addAlignedBarrier(A, *CB);
};
auto &LivenessAA =
More information about the llvm-commits
mailing list