nickdesaulniers added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:464-473 + const char *v8691OrLater[] = {"+v8.6a", "+v8.7a", "+v8.8a", + "+v9.1a", "+v9.2a", "+v9.3a"}; auto Pos = std::find_first_of(Features.begin(), Features.end(), - std::begin(Archs), std::end(Archs)); + std::begin(v8691OrLater), std::end(v8691OrLater)); if (Pos != std::end(Features)) Pos = Features.insert(std::next(Pos), {"+i8mm", "+bf16"}); ---------------- Is it possible to re-use some of the many calls to std::find (L395-403)? Seems like we re-scan the feature list A LOT. ================ Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:466-474 auto Pos = std::find_first_of(Features.begin(), Features.end(), - std::begin(Archs), std::end(Archs)); + 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 + // default. ---------------- Can we reuse `ItBegin` and `ItEnd` here rather than `Features.begin()` and `Features.end()`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120111/new/ https://reviews.llvm.org/D120111 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits