This is an archive of the discontinued LLVM Phabricator instance.

Replace the bitfield of SubtargetFeatures with a bitset - Redux
ClosedPublic

Authored by mkuper on Mar 23 2015, 6:16 AM.

Details

Summary

SubtargetFeatures uses a uint64_t bitfield to store the SubtargetFeatures of each target.
Unfortunately, at least for x86, we've run out of bits. This converts it into a bitset, removing the 64-feature limitation.

See http://reviews.llvm.org/D7065 for original review - that was committed and reverted due to failures on several architectures.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 22463.Mar 23 2015, 6:16 AM
mkuper retitled this revision from to Replace the bitfield of SubtargetFeatures with a bitset - Redux.
mkuper updated this object.
mkuper edited the test plan for this revision. (Show Details)
mkuper added a reviewer: rengolin.
mkuper added subscribers: Unknown Object (MLST), vsukharev, olista01.
rengolin edited edge metadata.Mar 23 2015, 6:19 AM

Hi Michael,

It seems to have worked on Gabor's box, I'll be running this on mine, and if everything is ok, I'll post it back.

cheers,
--renato

Great, thanks!

Wait... I got this error while building locally:

FAILED: /usr/bin/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wno-comment -std=c++11 -ffunction-sections -fdata-sections -O3 -Ilib/Target/AArch64/MCTargetDesc -I/home/linaro/devel/llvm/src/llvm/lib/Target/AArch64/MCTargetDesc -I/home/linaro/devel/llvm/src/llvm/lib/Target/AArch64 -Ilib/Target/AArch64 -Iinclude -I/home/linaro/devel/llvm/src/llvm/include -I/home/linaro/devel/llvm/src/llvm/lib/Target/AArch64/MCTargetDesc/.. -Ilib/Target/AArch64/MCTargetDesc/.. -UNDEBUG -fno-exceptions -fno-rtti -MMD -MT lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCTargetDesc.cpp.o -MF "lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCTargetDesc.cpp.o.d" -o lib/Target/AArch64/MCTargetDesc/CMakeFiles/LLVMAArch64Desc.dir/AArch64MCTargetDesc.cpp.o -c /home/linaro/devel/llvm/src/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp

/tmp/cc9nlF4T.s: Assembler messages:
/tmp/cc9nlF4T.s:12937: Error: invalid use of vector register at operand 1 -- `dup v16,v2.h[0]'
/tmp/cc9nlF4T.s:12938: Error: invalid use of vector register at operand 1 -- `dup v25,v2.h[0]'
/tmp/cc9nlF4T.s:17148: Error: invalid use of vector register at operand 1 -- `dup v3,v25.h[0]'

Isn't that the same GCC issue we had the first time around?

Right, so that's not a gcc problem, but a binutils problem... Whatever you commit may work on the buildbots but will fail when I do the next release. We need to get the right version of the tools everywhere.

This is my As:

$ as -v
GNU assembler version 2.24 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.24

rengolin accepted this revision.Mar 23 2015, 10:06 AM
rengolin edited edge metadata.

Sorry about all the confusion, I messed up my setup. It's working fine on gcc 4.9.1 / binutils 2.25.

This revision is now accepted and ready to land.Mar 23 2015, 10:06 AM
This revision was automatically updated to reflect the committed changes.

Right, so that's not a gcc problem, but a binutils problem... Whatever you commit may work on the buildbots but will fail when I do the next release. We need to get the right version of the tools everywhere.

This is my As:

$ as -v
GNU assembler version 2.24 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.24

Hi Renato,

I checked this patch both on the Juno board and on the QEMU chroot the llvm-aarch64-linux buildslave using.
There weren't any compile errors.

Both environment uses this assembler version: GNU assembler version 2.25 (aarch64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.25