llvm-project/llvm/test/CodeGen
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
..
AArch64 Revert "[GlobalISel] Support vector-of-pointers in LLT" 2017-04-18 09:26:36 +00:00
AMDGPU AMDGPU: Use MachineRegisterInfo to find max used register 2017-04-17 19:48:30 +00:00
ARM [ARM] Add hardware build attributes in assembler 2017-04-18 12:52:35 +00:00
AVR [AVR] Disable integrated assembler for a few tests 2017-02-22 22:41:13 +00:00
BPF [bpf] Fix memory offset check for loads and stores 2017-04-13 22:24:13 +00:00
Generic [Hexagon] Unxfail passing tests 2017-04-13 16:05:35 +00:00
Hexagon Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
Inputs
Lanai
MIR MIR: Allow parsing of empty machine functions 2017-04-11 19:32:41 +00:00
MSP430 In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00
Mips Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
NVPTX Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
PowerPC [PowerPC] multiply-with-overflow might use the CTR register 2017-04-11 02:03:17 +00:00
SPARC [Sparc] Check register use with isPhysRegUsed() instead of reg_nodbg_empty() 2017-03-08 15:23:10 +00:00
SystemZ Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
Thumb Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
Thumb2 Add address space mangling to lifetime intrinsics 2017-04-10 20:18:21 +00:00
WebAssembly [WebAssembly] Fix WebAssemblyOptimizeReturned after r300367 2017-04-17 21:40:28 +00:00
WinEH
X86 Change the testcase tail-merge-after-mbp.ll to tail-merge-after-mbp.mir 2017-04-17 22:22:38 +00:00
XCore In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-03-14 00:34:14 +00:00