================
@@ -6556,13 +6545,14 @@ OpenMPIRBuilder::InsertPointOrErrorTy 
OpenMPIRBuilder::emitCommonDirectiveExit(
     FinalizationInfo Fi = FinalizationStack.pop_back_val();
     assert(Fi.DK == OMPD && "Unexpected Directive for Finalization call!");
 
-    if (Error Err = Fi.FiniCB(FinIP))
-      return Err;
-
-    BasicBlock *FiniBB = FinIP.getBlock();
-    Instruction *FiniBBTI = FiniBB->getTerminator();
+    if (!Fi.FiniBB) {
+      if (Error Err = Fi.FiniCB(FinIP))
+        return Err;
+      Fi.FiniBB = FinIP.getBlock();
----------------
Meinersbur wrote:

[serious] Is there a guarantee that `FinIP` is a BasicBlock exclusive to 
finialization, and does not contain other code that would be executed if we 
reuse that block?

https://github.com/llvm/llvm-project/pull/164586
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to