[PATCH] D135715: [Clang] Do not build the OffloadActionBuilder when using the new driver

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 14:42:27 PDT 2022


jhuber6 added a comment.

Thanks for the quick review.



================
Comment at: clang/lib/Driver/Driver.cpp:3987-3988
     // required.
     if (!UseNewOffloadingDriver)
-      if (OffloadBuilder.addHostDependenceToDeviceActions(Current, InputArg))
+      if (OffloadBuilder->addHostDependenceToDeviceActions(Current, InputArg))
         break;
----------------
tra wrote:
> Nit: Having to prefix every use of `OffloadBuilder` looks a bit cumbersome.
> 
> It would look a bit cleaner if we had some sort of no-op builder we'd populate OffloadBuilder with. Does not buy us anything functionally, though, so it may not be worth complicating things just for this. Up to you.
The main difficulty is that the `OffloadBuilder` requires the input to be checked at different points, so we wouldn't be able to merge anything. My hope one day is to delete the `OffloadBuilder` entirely, so I'm also not too concerned with making it look nice in the meantime.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135715/new/

https://reviews.llvm.org/D135715



More information about the cfe-commits mailing list