[PATCH] D134546: [clang-offload-bundler] extracting compatible bundle entry

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 23 10:42:31 PDT 2022


tra added inline comments.


================
Comment at: clang/lib/Driver/OffloadBundler.cpp:1008
+    auto Output = Worklist.begin();
+    for (auto E = Worklist.end(); Output != E; Output++) {
+      if (isCodeObjectCompatible(
----------------
The patch description implies that there are at least two classes of compatible objects -- the ones that match exactly and the ones that are not exact match, but are still compatible.


Here we're iterating until we find the first compatible object. What if we also have the object that matches exactly, but it's further down the list. Is that a problem that we may pick one or the other, depending on the order they happen to appear in the worklist? It would be good to add a test case for this scenario.


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

https://reviews.llvm.org/D134546



More information about the cfe-commits mailing list