jdoerfert added a comment. In D70258#1788861 <https://reviews.llvm.org/D70258#1788861>, @rjmccall wrote:
> That's what I figured. Just to say this again: Current OpenMP code generation keeps a second stack for exactly the same purpose as the one introduced here. > The thing is that that necessarily interacts correctly with everything in > Clang's IRGen in ways that making a second stack that Clang's IRGen doesn't > directly know about doesn't. > > I think you either need to extract Clang's entire cleanup-stack concept into > a generic frontend library, so that both Clang and your generic OpenMP > lowering just manipulate that common stack, or you need to call back into the > frontend to manage your cleanup. I like the idea of a generic way to do this but I'm unsure if that is needed given the restrictions on OpenMP regions. We basically are not allowed to jump out by non-OpenMP means. What we do in the existing, and this rewritten stack is remember what OpenMP means will jump out of the current scope and to the end of the region. This can be reused in Flang as the restrictions hold there as well (as far as I know). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70258/new/ https://reviews.llvm.org/D70258 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits