[PATCH] D150860: [OpenMP] Change clang emitTargetDataCalls to use OMPIRBuilder

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 28 09:30:11 PDT 2023


arsenm added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:10395-10399
+    if (CGF.ConstantFoldsToSimpleInteger(IfCond, CondConstant)) {
+      IfCondVal = CGF.Builder.getInt1(CondConstant);
+    } else {
+      IfCondVal = CGF.EvaluateExprAsBool(IfCond);
+    }
----------------
Why do you need to do this? I would expect EvaluateExprAsBool to handle the constant case for you


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150860



More information about the cfe-commits mailing list