[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-23 Thread Joseph Huber via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6e6889288cdc: [Offloading] Embed the target features in the OffloadBinary (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: clang/test/Driver/openmp-offload-gpu-new.c:117 + +// CHECK-LTO-FEATURES: clang-offload-packager{{.*}}feature={{.*}}ptx tra wrote: > jh

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436611. jhuber6 added a comment. Does this approach work? I'm just using the reverse iterator and only adding the argument if it hasn't been seen yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:735 + llvm::StringMap LastOpt; + for (unsigned I = 0, N = Features.size(); I < N; ++I) { +StringRef Name = Features[I]; // Record the index of the last occurence

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 436607. jhuber6 added a comment. Adjust how we generate arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127686/new/ https://reviews.llvm.org/D127686 Files: clang/lib/Driver/ToolChains/Clang.cpp cl

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/openmp-offload-gpu-new.c:117 + +// CHECK-LTO-FEATURES: clang-offload-packager{{.*}}feature={{.*}}ptx jhuber6 wrote: > tra wrote: > > This should probably be a bit more specific/verbose. E.g. I'd want to mak

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Thanks for the comments, I'll try to address them. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8320 +TC->getDriver().isUsingLTO(/* IsOffload */ true) +? ",feature=" + llvm::join(FeatureArgs, ",feature=") +: "";

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8320 +TC->getDriver().isUsingLTO(/* IsOffload */ true) +? ",feature=" + llvm::join(FeatureArgs, ",feature=") +: ""; This makes a couple of implicit assump

[PATCH] D127686: [Offloading] Embed the target features in the OffloadBinary

2022-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992, tra, yaxunl, saiislam. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, MaskRay. Herald added a project: clang. The target fe