[PATCH] D150860: [OpenMP] Change clang emitTargetDataCalls to use OMPIRBuilder
Akash Banerjee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 28 10:07:12 PDT 2023
TIFitis 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);
+ }
----------------
arsenm wrote:
> Why do you need to do this? I would expect EvaluateExprAsBool to handle the constant case for you
`CGOpenMPRuntime::emitIfClause` has the check for `ConstantFoldsToSimpleInteger` so I added it here.
Removing it didn't break any test so I've updated it,
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