[all-commits] [llvm/llvm-project] fed966: [OpenMPIRBuilder] Implicitly defined control block...

Michael Kruse via All-commits all-commits at lists.llvm.org
Mon Dec 6 12:09:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fed966f2a45614fb1c3f66a7aaf99dc75ec2026d
      https://github.com/llvm/llvm-project/commit/fed966f2a45614fb1c3f66a7aaf99dc75ec2026d
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2021-12-06 (Mon, 06 Dec 2021)

  Changed paths:
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

  Log Message:
  -----------
  [OpenMPIRBuilder] Implicitly defined control blocks. NFC.

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.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D114368




More information about the All-commits mailing list