-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flang][OpenMP] Error when unstructured code is present #74348
Comments
There is the problem:
|
This happens because we always insert a terminator into the last block of the construct. In this case the last block is the loop (which is lowered later, and inserts its own branch), and we end up with This looks like it would be solved by the recursive lowering, since the loop would be lowered as a part of the parallel op lowering. This would make it possible to only insert |
Thanks @kparzysz for investigating this. It will be great if it works with your proposal. It might be good to go back and have a look at some of the previous fixes to ensure that you have the full context. |
This brings `createBodyOfOp` to its final intended form. First, input privatization is performed, then the recursive lowering takes place, and finally the output privatization (lastprivate) is done. This enables fixing a known issue with infinite loops inside of an OpenMP region, and the fix is included in this patch. Fixes #74348. Recursive lowering [5/5]
…77761) This brings `createBodyOfOp` to its final intended form. First, input privatization is performed, then the recursive lowering takes place, and finally the output privatization (lastprivate) is done. This enables fixing a known issue with infinite loops inside of an OpenMP region, and the fix is included in this patch. Fixes #74348. Recursive lowering [5/5] --------- Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>
@llvm/issue-subscribers-flang-ir Author: Kiran Chandramohan (kiranchandramohan)
This is another instance where the presence of unstructured code in OpenMP regions leads to failure.
Errorerror: loc("fname.f90":10:3): operation with block successors must terminate its parent block Program
|
This is another instance where the presence of unstructured code in OpenMP regions leads to failure.
Error
error: loc("fname.f90":10:3): operation with block successors must terminate its parent block
Program
The text was updated successfully, but these errors were encountered: