[PATCH] D123325: [Clang] Make enabling the new driver more generic
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 28 12:05:06 PDT 2022
tra added inline comments.
Comment at: clang/include/clang/Driver/Options.td:2535-2538
+def foffload_new_driver : Flag<["-"], "foffload-new-driver">, Flags<[CC1Option]>, Group<Action_Group>,
+ HelpText<"Use the new driver for offloading compilation.">;
+def fno_offload_new_driver : Flag<["-"], "fno-offload-new-driver">, Flags<[CC1Option]>, Group<Action_Group>,
+ HelpText<"Don't Use the new driver for offloading compilation.">;
> tra wrote:
> > Nit: Can we combine that into a `BoolFOption` instead of using `Flag` ?
> > Also, considering that it's an option which controls the driver's behavior, not just tweaks code generation, perhaps it should be just `--[no]offload-new-driver`.
> The `-fopenmp` variant was in LLVM-14 so that should stay at least. I could change it to be `--offload` (Although this does tweak code generation in a later patch to make the offloading entries). I most just used `-f` because all the other OpenMP options use `-f`. I could definitely use `BoolFOption` but I don't think it saves too much in this situation.
Naming is hard. :-) Real world things don't want to fit into neat categories.
I think `--offload*` would fit the general pattern of transitioning niche features (be it CUDA,HIP, OpenMP) into something more general (offload, GPU).
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits