[PATCH] CUDA: Add option to allow host device functions to call host functions

Reid Kleckner rnk at google.com
Tue Feb 24 08:55:26 PST 2015


I'm surprised this change doesn't break the cuda codegen pipeline, because there aren't any changes to CodeGen in this patch. This is specifically relaxing the case of a host+device function calling host while in device mode. It's not actually possible to codegen this function, right? Is codegen already set up to compile this case to runtime error?


================
Comment at: include/clang/Driver/CC1Options.td:612
@@ +611,3 @@
+def fcuda_host_device_functions_calling_host_functions : Flag<["-"],
+    "fcuda-host-device-functions-calling-host-functions">,
+  HelpText<"Allow host device functions to call host functions">;
----------------
eliben wrote:
> I think the word "allow" should be in the flag somewhere.
> 
> How about: "fcuda-allow-host-calls-from-host-device" ?
> 
> Has the word "allow" AND is shorter ;-)
+1 for the suggested name.

http://reviews.llvm.org/D7841

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list