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

Keith Walker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 06:59:59 PST 2017


keith.walker.arm updated this revision to Diff 123936.
keith.walker.arm added a comment.

I have updated the patch with the suggested change to use a list of features to disable.

I checked that LLVM does indeed implicitly disable features if they are dependent on a feature that is explicitly disabled, so in theory we
could just disable "vfp2" and "neon".    However I found that this made the tests in clang more difficult to write and understand.

For example if a test wants to check that "dotprod" is not enabled:

- with the explicit disabling the check can be: CHECK-NO-DOTPROD-NOT: "--target-feature" "+dotprod"
- with implicit disabling the check needs to be something like: CHECK-NO-DOTPROD: "--target-feature" "+dotprod" CHECK-NO-DOTPROD: "--target-feature" "-neon"

I think this made the tests harder to understand as there is more implicit knowledge required to understand what is going on.

For this reason I have gone for still explicitly disabling the dependent FP features, with a FIXME so that this could be improved in the future.


https://reviews.llvm.org/D40256

Files:
  lib/Driver/ToolChains/Arch/ARM.cpp
  test/Driver/arm-cortex-cpus.c
  test/Driver/arm-dotprod.c
  test/Driver/arm-mfpu.c
  test/Preprocessor/arm-target-features.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40256.123936.patch
Type: text/x-patch
Size: 54078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171122/6950dbe4/attachment-0001.bin>


More information about the cfe-commits mailing list