[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
Thu Jan 23 11:34:34 PST 2020


fghanim created this revision.
fghanim added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, cfe-commits, guansong, hiraditya.
Herald added projects: clang, LLVM.

In some situations (e.g. `while(1);` ) the body block(s) will not contain a branch to the finalization block.
In this patch, `CreateParallel` has been modified to check if the `PRegPreFiniBB` is reachable before
generating finalization code. If not, will remove all unreachable blocks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73285

Files:
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73285.239952.patch
Type: text/x-patch
Size: 5007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/d6f96834/attachment.bin>


More information about the llvm-commits mailing list