This patch extends the SPMD implementation to all target constructs and guards this implementation under a new flag.
I think most other boolean options do the following:
if (Args.hasFlag(...)) CmdArgs.push_back("...")
Is there a reason we need this differently here?
Yes, I'd also expect all SPMD constructs to default to CUDA mode. Or is there a case where this doesn't work? If yes, that should be explained in the summary.
If you implement Jonas's suggested fix, no need to mark it as CC1Option
Agree, this looks much better
Cuda mode is going to be the default for all constructs, as Generic mode is not ready yet. The codegen mode is not controlled by the construct, but by the option completely.