[flang-commits] [flang] [llvm] [OpenMP][LLVM] Update alloca IP after `PrivCB` in `OMPIRBUIlder` (PR #93920)
    Kareem Ergawy via flang-commits 
    flang-commits at lists.llvm.org
       
    Mon Jun  3 06:56:48 PDT 2024
    
    
  
================
@@ -1583,6 +1583,9 @@ IRBuilder<>::InsertPoint OpenMPIRBuilder::createParallel(
     } else {
       Builder.restoreIP(
           PrivCB(InnerAllocaIP, Builder.saveIP(), V, *Inner, ReplacementValue));
+      InnerAllocaIP = {InnerAllocaIP.getPoint()->getParent(),
----------------
ergawy wrote:
> ```
>     allocaIP =
>         InsertPointTy(allocaIP.getBlock(),
>                       allocaIP.getBlock()->getTerminator()->getIterator());
> ```
I can do that. I actually tried that locally and did not commit it since it did not make much difference in terms of generated IR. However, it makes sense to commit it given the point you mentioned about consistency.
https://github.com/llvm/llvm-project/pull/93920
    
    
More information about the flang-commits
mailing list