================ @@ -5498,7 +5510,8 @@ OpenMPIRBuilder::InsertPointOrErrorTy OpenMPIRBuilder::applyStaticWorkshareLoop( Builder.CreateStore(UpperBound, PUpperBound); Builder.CreateStore(One, PStride); - Value *ThreadNum = getOrCreateThreadID(SrcLoc); + Value *ThreadNum = + getOrCreateThreadID(getOrCreateIdent(SrcLocStr, SrcLocStrSize)); ---------------- Thyre wrote:
In an earlier revision, I used the created `Flag`. This seemed to work fine as well. Looking at [`__kmpc_global_thread_num`](https://github.com/llvm/llvm-project/blob/f5eb99ac14a1ca5f2a9771ada2c8c672b430f253/openmp/runtime/src/kmp_csupport.cpp#L100), the passed `ident_t` seems to be entirely unused. The current implementation is more consistent with the remainder of `OMPIRBuilder`. All calls to `getOrCreateThreadID` do not pass any `LocFlags` or `Reserve2Flags` as far as I can tell. I'm fine with changing this to whatever fits best. https://github.com/llvm/llvm-project/pull/189347 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
