[PATCH] D130615: [OpenMP][IRBuilder] Added if clause to task

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 09:22:53 PDT 2022


Meinersbur added inline comments.


================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:1452
+      // terminator.
+      auto *UI = Builder.CreateUnreachable();
+      Instruction *ThenTI = UI, *ElseTI = nullptr;
----------------
[style] No Almost-Always-Auto in LLVM code.

Creating temporary instructions and removing them has issues. In addition to be inefficient, it creates issues if other code stores a pointer to it (eg. InsertPoint). Consider using `splitBB` which does not require a terminator.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130615/new/

https://reviews.llvm.org/D130615



More information about the llvm-commits mailing list