For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted.
Details
- Reviewers
arpith-jacob sfantao caomhin carlo.bertolli ABataev Hahnfeld hfinkel tstellar - Commits
- rGe3b0a19d4f23: [OpenMP] Prevent emission of exception handling code when using OpenMP to…
rC310306: [OpenMP] Prevent emission of exception handling code when using OpenMP to…
rL310306: [OpenMP] Prevent emission of exception handling code when using OpenMP to…
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM. Please run clang-format before committing!
test/OpenMP/target_parallel_no_exceptions.cpp | ||
---|---|---|
7–8 | Not needed, please keep the test as small as possible |
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2228–2233 | Alexey, any suggestion where this code should be moved to? |
Out of interest: This is a limition of the implementation, right? Because the standard only says: A throw executed inside a target region must cause execution to resume within the same target region, and the same thread that threw the exception must catch it.
test/OpenMP/target_parallel_no_exceptions.cpp | ||
---|---|---|
15 | Please make the test be valid OpenMP: inc is not in declare target and it's also a data race. I think it's enough to only have a target construct in the test. |
lib/Frontend/CompilerInvocation.cpp | ||
---|---|---|
2228–2233 | Alexey, this code is in the function that initializes Opts.Exceptions and Opts.CXXExceptions and comes after that initialization so the options are not being overwritten by it. |
I'm not sure this is the right place for this code.