[PATCH] D114368: [OpenMPIRBuilder] Implicitly defined control blocks. NFC.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 22 07:12:59 PST 2021


Meinersbur created this revision.
Meinersbur added reviewers: jdoerfert, AMDChirag, anchu-rajendran, kiranchandramohan, SouraVX, ftynse, kiranktp, fghanim, jdenny, MatsPetersson.
Meinersbur added a project: OpenMP.
Herald added subscribers: guansong, hiraditya, yaxunl.
Meinersbur requested review of this revision.
Herald added subscribers: llvm-commits, sstefan1.
Herald added a project: LLVM.

Do not explicitly store the BasicBlocks for Preheader, Body and After inside CanonicalLoopInfo, but look the up when needed using their position relative to the other loop control blocks. By definition, instructions inside these are not managed by CanonicalLoopInfo (except terminator for Preheader) hence it makes sense to think of them as connections to the CanonicalLoopInfo instead of part of the CanonicalLoopInfo itself.

In particular for Preheader, it makes using SplitBasicBlock easier since inserting control flow at an InsertPoint may otherwise require updating the CanonicalLoopInfo's Preheader because the branch that jumps to the header is moved to another BasicBlock.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114368

Files:
  llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114368.388908.patch
Type: text/x-patch
Size: 6629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211122/e5439160/attachment.bin>


More information about the llvm-commits mailing list