[PATCH] D73285: [OpenMP][OMPIRBuilder][BugFix] Handle Unreachable Finalization blocks in `parallel` generation
Fady Ghanim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 13:34:09 PST 2020
fghanim marked an inline comment as done.
fghanim added inline comments.
================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:661
+ AfterIP = InsertPointTy(ForkBB, ForkBB->end());
+ }
----------------
jdoerfert wrote:
> Why do we need all of this? Can't we just *not do it* instead? This is code complexity that we should avoid.
Depends.
If we want to conform with the way things are done in clang; namely, not have unreachable blocks, then yes we need to do this. If not, then no, nothing needs to change. An optimization pass will be executed at some point later that should clean all that up.
However, we should be careful, for example, The lit test for `critical` checks that no basic blocks were generated from the rest of the body that comes after the infinite loop. So if the choice is to not conform with clang, then we should keep an eye on these lit tests, and disable such checks for the OMPBuilder.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73285/new/
https://reviews.llvm.org/D73285
More information about the llvm-commits
mailing list