[llvm] 1d4ca42 - [OpenMPIRBuilder] Detect ambiguous InsertPoints for apply*WorkshareLoop. NFC.
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 20 14:11:42 PST 2022
Author: Michael Kruse
Date: 2022-01-20T16:10:17-06:00
New Revision: 1d4ca42b43805f7199b921f35c1257b2cbad72c9
URL: https://github.com/llvm/llvm-project/commit/1d4ca42b43805f7199b921f35c1257b2cbad72c9
DIFF: https://github.com/llvm/llvm-project/commit/1d4ca42b43805f7199b921f35c1257b2cbad72c9.diff
LOG: [OpenMPIRBuilder] Detect ambiguous InsertPoints for apply*WorkshareLoop. NFC.
Follow-up on D117226 for applyStaticWorkshareLoop and
applyDynamicWorkshareLoop checking for conflicting InertPoints via an
assert. There is no in-tree code that violates this assertion, hence
nothing changes.
Added:
Modified:
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 0bf0c832d5ddf..177ae9a47db75 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -1516,6 +1516,8 @@ OpenMPIRBuilder::applyStaticWorkshareLoop(DebugLoc DL, CanonicalLoopInfo *CLI,
InsertPointTy AllocaIP,
bool NeedsBarrier, Value *Chunk) {
assert(CLI->isValid() && "Requires a valid canonical loop");
+ assert(!isConflictIP(AllocaIP, CLI->getPreheaderIP()) &&
+ "Require dedicated allocate IP");
// Set up the source location value for OpenMP runtime.
Builder.restoreIP(CLI->getPreheaderIP());
@@ -1646,6 +1648,8 @@ OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::applyDynamicWorkshareLoop(
DebugLoc DL, CanonicalLoopInfo *CLI, InsertPointTy AllocaIP,
OMPScheduleType SchedType, bool NeedsBarrier, Value *Chunk) {
assert(CLI->isValid() && "Requires a valid canonical loop");
+ assert(!isConflictIP(AllocaIP, CLI->getPreheaderIP()) &&
+ "Require dedicated allocate IP");
// Set up the source location value for OpenMP runtime.
Builder.SetCurrentDebugLocation(DL);
More information about the llvm-commits
mailing list