[PATCH] D40256: [ARM] disable FPU features when using soft floating point.

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 17:43:56 PST 2017


compnerd added inline comments.


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:419
+        Features.push_back("-fullfp16");
+
+    const bool HasNeon  = (std::find(ItBegin, ItEnd, "+neon") != ItEnd);
----------------
It would be nice to not have these explicitly listed.  But at the very least, I think that having a list and looping through it would be better:

    for (const auto Feature : {"vfpv2", "vfpv3", "vfpv4", "fp-armv8", "fullfp16"})
      if (std::find(std::begin(Features), std::end(Features), "+" + Feature) == std::end(Features))
        continue;
      else
        Features.push_back("-" + Feature);


================
Comment at: lib/Driver/ToolChains/Arch/ARM.cpp:429
+    if (HasDotProd)
+        Features.push_back("-dotprod");
   }
----------------
Similar.


https://reviews.llvm.org/D40256





More information about the cfe-commits mailing list