[all-commits] [llvm/llvm-project] 4d28bd: [mlir][OpenMP] Convert omp.cancel sections to LLVMIR
Tom Eccles via All-commits
all-commits at lists.llvm.org
Fri Apr 25 07:17:22 PDT 2025
Branch: refs/heads/users/tblah/omp-cancel-codegen-1
Home: https://github.com/llvm/llvm-project
Commit: 4d28bd8f0106321af6679e9b155fd36ef2f919fc
https://github.com/llvm/llvm-project/commit/4d28bd8f0106321af6679e9b155fd36ef2f919fc
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2025-04-25 (Fri, 25 Apr 2025)
Changed paths:
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
M mlir/test/Target/LLVMIR/openmp-cancel.mlir
M mlir/test/Target/LLVMIR/openmp-todo.mlir
Log Message:
-----------
[mlir][OpenMP] Convert omp.cancel sections to LLVMIR
This is quite ugly but it is the best I could think of. The old
FiniCBWrapper was way too brittle depending upon the exact block
structure inside of the section, and could be confused by any control
flow in the section (e.g. an if clause on cancel). The wording in the
comment and variable names didn't seem to match where it was actually
branching too as well.
Clang's (non-OpenMPIRBuilder) lowering for cancel inside of sections
branches to a block containing __kmpc_for_static_fini.
This was hard to achieve here because sometimes the FiniCBWrapper has to
run before the worksharing loop finalization has been crated.
To get around this ordering issue I created a dummy branch to a dummy
block, which is then fixed later once all of the information is
available.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list