[PATCH] D120111: [AArch64] Default HBC/MOPS features in clang

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 1 11:18:35 PST 2022


nickdesaulniers accepted this revision.
nickdesaulniers added a comment.

In D120111#3351001 <https://reviews.llvm.org/D120111#3351001>, @tmatheson wrote:

> LGTM, please give @nickdesaulniers some time to respond though. I do agree that iterating over the features repeatedly is less than ideal, but also that this patch is probably not the place to try to fix it.

I'm not exactly thrilled about continuing to kick the can down the road on this; consider making a child revision that fixes that first, then landing this patch. Otherwise that never gets cleaned up.



================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:466-478
+  auto Pos =
+      std::find_first_of(Features.begin(), Features.end(),
+                         std::begin(v8691OrLater), std::end(v8691OrLater));
   if (Pos != std::end(Features))
     Pos = Features.insert(std::next(Pos), {"+i8mm", "+bf16"});
 
+  // For Armv8.8-a/Armv9.3-a or later, FEAT_HBC and FEAT_MOPS are enabled by
----------------
Is `Pos` ever read later, or simply compared to `std::end(Features)`? If not, consider simplifying removing `Pos` outright and simply calling `std::find_first_of` in an `if` predicate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120111



More information about the cfe-commits mailing list