llvm-project/llvm/test
Oliver Stannard 7ad2e8aae1 [ARM] Add hardware build attributes in assembler
In the assembler, we should emit build attributes based on the target
selected with command-line options. This matches the GNU assembler's
behaviour. We only do this for build attributes which describe the
hardware that is expected to be available, not the ones that describe
ABI compatibility.

This is done by moving some of the attribute emission code to
ARMTargetStreamer, so that it can be shared between the assembly and
code-generation code paths. Since the assembler only creates a
MCSubtargetInfo, not an ARMSubtarget, the code had to be changed to
check raw features, and not use the convenience functions in
ARMSubtarget.

If different attributes are later specified using the .eabi_attribute
directive, then they will take precedence, as happens when the same
.eabi_attribute is specified twice.

This must be enabled by an option, because we don't want to do this when
parsing inline assembly. The attributes would match the ones emitted at
the start of the file, so wouldn't actually change the emitted object
file, but the extra directives would be added to every inline assembly
block when emitting assembly, which we'd like to avoid.

The majority of the changes in the build-attributes.ll test are just
re-ordering the directives, because the hardware attributes are now
emitted before the ABI ones. However, I did fix one bug which I spotted:
Tag_CPU_arch_profile was not being emitted for v6M.

Differential revision: https://reviews.llvm.org/D31812

llvm-svn: 300547
2017-04-18 12:52:35 +00:00
..
Analysis [BPI] Use metadata info before any other heuristics 2017-04-17 04:33:04 +00:00
Assembler Allow DataLayout to specify addrspace for allocas. 2017-04-10 22:27:50 +00:00
Bindings
Bitcode PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
BugPoint llvm/test/BugPoint/compile-custom.ll: Use %/s for its path not to be mis-escaped. 2017-04-13 11:40:32 +00:00
CodeGen [ARM] Add hardware build attributes in assembler 2017-04-18 12:52:35 +00:00
DebugInfo PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
Examples
ExecutionEngine
Feature [GVNHoist] Re-enable GVNHoist by default 2017-04-11 14:36:30 +00:00
FileCheck [FileCheck] Added --enable-var-scope option to enable scope for regex variables. 2017-03-09 17:59:04 +00:00
Instrumentation PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
Integer
JitListener
LTO Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
LibDriver
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
MC [ARM] Add hardware build attributes in assembler 2017-04-18 12:52:35 +00:00
Object [llvm-ar] errors go on stderr and not on stdout. 2017-04-05 14:52:17 +00:00
ObjectYAML [Test commit] Cleanup some whitespace in a test file 2017-04-14 18:43:57 +00:00
Other Remove readnone from invariant.group.barrier 2017-04-12 20:45:12 +00:00
SymbolRewriter
TableGen [globalisel][tablegen] Add experimental support for OperandWithDefaultOps, PredicateOperand, and OptionalDefOperand 2017-04-12 08:23:08 +00:00
ThinLTO/X86 Bitcode: Add a string table to the bitcode format. 2017-04-17 17:51:36 +00:00
Transforms PR32382: Fix emitting complex DWARF expressions. 2017-04-18 01:21:53 +00:00
Unit
Verifier Verifier: Check some amdgpu calling convention restrictions 2017-04-04 18:43:11 +00:00
YAMLParser
tools Update the test to fix the buildbot failure introduced by r300486 (NFC) 2017-04-17 20:35:32 +00:00
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg
lit.site.cfg.in