[PATCH] D82948: [Driver][ARM] Disable unsupported features when nofp arch extension is used
Momchil Velikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 1 12:27:13 PDT 2020
chill added a comment.
Needs a regression test. This patch and the dependent patch clash, better with a single patch.
================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:288
+static void appendNoFPUnsupportedFeatures(const arm::FloatABI ABI,
+ const unsigned FPUID,
----------------
That's kinda mouthful name.
================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:292-297
+ auto checkFPDisabledInArchName = [](const StringRef &ArchName) {
+ SmallVector<StringRef, 8> Split;
+ ArchName.split(Split, '+', -1, false);
+ return llvm::any_of(
+ Split, [](const StringRef &Extension) { return Extension == "nofp"; });
+ };
----------------
Wouldn't just looking for the substring do the job?
Also need to handle `-mcpu=...+nofp`.
We already "parse" the arguments to `-march=` and `-mcpu=` (and `-mfpu=`) earlier, it seems to me we
could note the `+nofp` and `+nofp.dp` earlier. (TBH, it isn't immediately obvious to me how to untangle this mess).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82948/new/
https://reviews.llvm.org/D82948
More information about the cfe-commits
mailing list