llvm-6502/include/llvm
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
..
ADT [ADT] fail-fast iterators for DenseMap 2015-03-02 23:29:37 +00:00
Analysis Another missing include for MSVC. 2015-03-01 22:34:04 +00:00
AsmParser Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
Bitcode [opaque pointer type] Bitcode support for explicit type parameter on GEP. 2015-02-25 01:08:52 +00:00
CodeGen Refactor DebugLocDWARFExpression so it doesn't require access to the 2015-03-02 22:02:33 +00:00
Config [Support/Timer] Make GetMallocUsage() aware of jemalloc. 2015-02-19 07:27:14 +00:00
DebugInfo [llvm-pdbdump] Many minor fixes and improvements 2015-03-02 04:39:56 +00:00
ExecutionEngine Orc/JITSymbol.h requires not "Compiler.h" but "DataTypes.h" due to uint64_t. 2015-02-23 11:12:52 +00:00
IR std::function is part of <functional>, not <utility> 2015-03-01 21:49:21 +00:00
IRReader Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
LineEditor
Linker [LTO API] add lto_codegen_set_module to set the destination module. 2015-02-24 00:45:56 +00:00
LTO [LTO API] fix memory leakage introduced at r230290. 2015-02-25 21:20:53 +00:00
MC Remove useless .debug_macinfo section setup. 2015-03-02 19:52:42 +00:00
Object [obj2yaml/yaml2obj] Add SHT_GROUP support. 2015-02-21 04:28:26 +00:00
Option Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
ProfileData Add another missing header that used to be included transitively. 2015-03-02 01:08:07 +00:00
Support Support: Use const pointers for reads. 2015-03-02 21:50:28 +00:00
TableGen Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
Target Reverted 230471 - gather scatter handling in table gen. 2015-03-01 08:23:41 +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
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h Remove the Forward Control Flow Integrity pass and its dependencies. 2015-02-27 19:03:38 +00:00
LinkAllIR.h
LinkAllPasses.h Remove the Forward Control Flow Integrity pass and its dependencies. 2015-02-27 19:03:38 +00:00
module.modulemap [modules] Add include/llvm/IR/DebugInfoFlags.def to the textual headers list. 2015-02-25 01:44:09 +00:00
module.modulemap.build
Pass.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassAnalysisSupport.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassInfo.h Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for requiring the macro. NFC; LLVM edition. 2015-02-15 22:54:22 +00:00
PassRegistry.h [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00