Go to file
Florian Hahn fc4b3951e9 [ARM] Remove FeatureNoARM implies ModeThumb.
Summary:
By removing FeatureNoARM implies ModeThumb, we can detect cases where a
function's target-features contain -thumb-mode (enables ARM codegen for the
function), but the architecture does not support ARM mode. Previously, the
implication caused the FeatureNoARM bit to be cleared for functions with
-thumb-mode, making the assertion in ARMSubtarget::ARMSubtarget [1]
pointless for such functions.

This assertion is the only guard against generating ARM code for
architectures without ARM codegen support. Is there a place where we
could easily generate error messages for the user? At the moment, we
would generate ARM code for Thumb-only architectures. X86 has the same
behavior as ARM, as in it only has an assertion and no error message,
but I think for ARM an error message would be helpful. What do you
think?

For the example below, `llc -mtriple=armv7m-eabi test.ll -o -` will
generate ARM assembler (or fail with an assertion error with this patch).
Note that if we run the resulting assembler through llvm-mc, we get
an appropriate error message, but not when codegen is handled
through clang.

```
define void @bar() #0 {
entry:
  ret void
}

attributes #0 = { "target-features"="-thumb-mode" }
```

[1] c1f7b54cef/lib/Target/ARM/ARMSubtarget.cpp (L147)

Reviewers: t.p.northover, rengolin, peter.smith, aadg, silviu.baranga, richard.barton.arm, echristo

Reviewed By: rengolin, echristo

Subscribers: efriedma, aemerson, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D35569

llvm-svn: 310476
2017-08-09 13:53:28 +00:00
clang [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases 2017-08-09 13:31:41 +00:00
clang-tools-extra [clangd] Fixed a bug in make_tagged. 2017-08-09 12:55:13 +00:00
compiler-rt [asan] Refactor thread creation bookkeeping 2017-08-09 00:38:57 +00:00
debuginfo-tests Add a test for PR33166. 2017-05-25 19:33:16 +00:00
libclc configure.py: Make python3 friendly 2017-08-02 15:00:59 +00:00
libcxx [libc++] Don't hardcode namespace in manual mangling 2017-08-07 19:59:58 +00:00
libcxxabi [demangler] Rename some variables, NFC 2017-08-08 20:57:10 +00:00
libunwind [CMake] Allow overriding lib dir suffix independently from LLVM 2017-08-08 00:37:59 +00:00
lld [PDB] Fix an issue writing the publics stream. 2017-08-09 04:23:59 +00:00
lldb Expose active and available platform lists via SBDebugger API 2017-08-09 09:20:40 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [ARM] Remove FeatureNoARM implies ModeThumb. 2017-08-09 13:53:28 +00:00
openmp Exclude version symbols for static libomp 2017-08-02 20:10:00 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ManagedMemoryRewrite] Remove test case that was submitted by mistake. [NFC] 2017-08-09 13:34:54 +00:00