[PATCH] D29904: [OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 09:22:38 PDT 2017


gtbercea marked 2 inline comments as done.
gtbercea added inline comments.


================
Comment at: lib/Frontend/CompilerInvocation.cpp:2167-2172
+    // Set the flag to prevent the implementation from emitting device exception
+    // handling code for those requiring so.
+    if (Opts.OpenMPIsDevice && T.isNVPTX()) {
+      Opts.Exceptions = 0;
+      Opts.CXXExceptions = 0;
+    }
----------------
gtbercea wrote:
> ABataev wrote:
> > I'm not sure this is the right place for this code.
> Alexey, any suggestion where this code should be moved to?
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.


Repository:
  rL LLVM

https://reviews.llvm.org/D29904





More information about the cfe-commits mailing list