llvm-6502/test
Peter Collingbourne 27821d7200 LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.
By loading from indexed offsets into a byte array and applying a mask, a
program can test bits from the bit set with a relatively short instruction
sequence. For example, suppose we have 15 bit sets to lay out:

A (16 bits), B (15 bits), C (14 bits), D (13 bits), E (12 bits),
F (11 bits), G (10 bits), H (9 bits), I (7 bits), J (6 bits), K (5 bits),
L (4 bits), M (3 bits), N (2 bits), O (1 bit)

These bits can be laid out in a 16-byte array like this:

      Byte Offset
    0123456789ABCDEF
Bit
  7 HHHHHHHHHIIIIIII
  6 GGGGGGGGGGJJJJJJ
  5 FFFFFFFFFFFKKKKK
  4 EEEEEEEEEEEELLLL
  3 DDDDDDDDDDDDDMMM
  2 CCCCCCCCCCCCCCNN
  1 BBBBBBBBBBBBBBBO
  0 AAAAAAAAAAAAAAAA

For example, to test bit X of A, we evaluate ((bits[X] & 1) != 0), or to
test bit X of I, we evaluate ((bits[9 + X] & 0x80) != 0). This can be done
in 1-2 machine instructions on x86, or 4-6 instructions on ARM.

This uses the LPT multiprocessor scheduling algorithm to lay out the bits
efficiently.

Saves ~450KB of instructions in a recent build of Chromium.

Differential Revision: http://reviews.llvm.org/D7954

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231043 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 00:49:28 +00:00
..
Analysis [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Assembler Teach DataLayout that alignments on basic types must be powers of two. 2015-03-02 09:35:03 +00:00
Bindings
Bitcode [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
BugPoint [opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction 2015-02-27 19:29:02 +00:00
CodeGen Remap arguments and non-alloca values used by outlined C++ exception handlers. 2015-03-03 00:41:03 +00:00
DebugInfo Revert r230979, should apply to all X86 ELF. 2015-03-02 18:50:18 +00:00
ExecutionEngine [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Feature [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
FileCheck FileCheck: Add CHECK-SAME 2015-02-26 04:53:00 +00:00
Instrumentation [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Integer [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
JitListener [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
Linker lit: Add 'cd' support to the internal shell and port some tests 2015-03-02 21:33:18 +00:00
LTO [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
MC AVX-512: Add assembly parser support for Rounding mode 2015-03-02 15:00:34 +00:00
Object lit: Add 'cd' support to the internal shell and port some tests 2015-03-02 21:33:18 +00:00
Other [opaque pointer type] Add textual IR support for explicit type parameter to load instruction 2015-02-27 21:17:42 +00:00
SymbolRewriter
TableGen
tools lit: Add 'cd' support to the internal shell and port some tests 2015-03-02 21:33:18 +00:00
Transforms LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets. 2015-03-03 00:49:28 +00:00
Unit
Verifier Teach the verifier to enforce that the alignment argument of memory intrinsics must be a power of 2. 2015-03-02 09:35:06 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Change SystemZ large tests to use the existing long_tests property 2015-03-02 19:34:11 +00:00
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh