[Openmp-commits] [PATCH] D106301: [OpenMP] Disable trap before unreachable for OpenMP device jobs
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 19 12:33:40 PDT 2021
jdoerfert updated this revision to Diff 359882.
jdoerfert added a comment.
Fix copy&paste error
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106301/new/
https://reviews.llvm.org/D106301
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/openmp-offload-gpu.c
Index: clang/test/Driver/openmp-offload-gpu.c
===================================================================
--- clang/test/Driver/openmp-offload-gpu.c
+++ clang/test/Driver/openmp-offload-gpu.c
@@ -214,11 +214,13 @@
// DEBUG_DIRECTIVES-NOT: warning: debug
// NO_DEBUG-NOT: warning: debug
// NO_DEBUG: "-fopenmp-is-device"
+// NO_DEBUG-SAME: "-trap-before-unreachable=never"
// NO_DEBUG-NOT: "-debug-info-kind=
// NO_DEBUG: ptxas
// DEBUG_DIRECTIVES: "-triple" "nvptx64-nvidia-cuda"
// DEBUG_DIRECTIVES-SAME: "-debug-info-kind=line-directives-only"
// DEBUG_DIRECTIVES-SAME: "-fopenmp-is-device"
+// DEBUG-DIRECTIVES-SAME: "-trap-before-unreachable=never"
// DEBUG_DIRECTIVES: ptxas
// DEBUG_DIRECTIVES: "-lineinfo"
// NO_DEBUG-NOT: "-g"
@@ -251,6 +253,7 @@
// HAS_DEBUG-SAME: "-debug-info-kind={{limited|line-tables-only}}"
// HAS_DEBUG-SAME: "-dwarf-version=2"
// HAS_DEBUG-SAME: "-fopenmp-is-device"
+// HAS_DEBUG-SAME: "-trap-before-unreachable=never"
// HAS_DEBUG: ptxas
// HAS_DEBUG-SAME: "-g"
// HAS_DEBUG-SAME: "--dont-merge-basicblocks"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -6621,6 +6621,10 @@
CmdArgs.push_back("-fopenmp-host-ir-file-path");
CmdArgs.push_back(Args.MakeArgString(OpenMPDeviceInput->getFilename()));
}
+
+ // We disable `llvm.trap` generation in OpenMP offload code generation.
+ CmdArgs.push_back("-mllvm");
+ CmdArgs.push_back("-trap-before-unreachable=never");
}
if (Triple.isAMDGPU()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106301.359882.patch
Type: text/x-patch
Size: 1637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210719/0de0ad30/attachment.bin>
More information about the Openmp-commits
mailing list