[PATCH] D127673: [OpenMP] Fix offload packager not writing to temps correctly

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 11:28:03 PDT 2022


tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

LGTM overall with a couple of nits.



================
Comment at: clang/lib/Driver/Driver.cpp:5420
+        /*CreatePrefixForHost=*/isa<OffloadPackagerJobAction>(A) ||
+            (!!A->getOffloadingHostActiveKinds() && !AtTopLevel));
     if (isa<OffloadWrapperJobAction>(JA)) {
----------------
`!!` assumes specific values for the mask returned by getOffloadingHostActiveKinds().

`(A->getOffloadingHostActiveKinds() != OFK_None && !AtTopLevel)` would be a bit easier to understand, IMO.
Maybe even `!(A->getOffloadingHostActiveKinds() == OFK_None || AtTopLevel)`.



================
Comment at: clang/lib/Driver/Driver.cpp:5657
                                              options::OPT_fno_gpu_rdc, false);
-      if (IsHIPNoRDC) {
+      if (IsHIPNoRDC || isa<OffloadPackagerJobAction>(JA)) {
         Output = BaseName;
----------------
```
bool UseOutExt = IsHIPNoRDC || isa<OffloadPackagerJobAction>(JA);
if (UseOutExt)
  ...
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127673



More information about the cfe-commits mailing list