Version 3 (modified by cameron, 5 years ago) (diff)


The Complete Integer Project

This project involves systematic support for integers and vectors of integers in all power-of-2 configurations up to 256 bits.

In general, this project seeks to "fill in the gaps" of LLVM support, specifically as follows.

  1. Add first class support for short integer types i1, i2, i4.
  2. Add first class support for LongInteger types i128, i256.
  3. Add first class support for vectors of integers of i1, i2 and i4 types up to <256 x i1>, <128 x i2>, <64 x i4>.
  4. Add first class support for vectors of long integers <2 x i128>.

Example: 2-bit Fields

There can be some applications of 2-bit integer fields, i.e., the SIMD vector type <64 x i2> for 128-bit SIMD registers.

Can this be implemented in a generic way as follows:

  1. Make it a legal type in the SelectionDAG LegalizeTypes phase.
  2. Create implementations of the standard vector operations and rule out all others in the SelectionDAG Legalize phase.
  3. Implement each operation using bitwise logic on the 2 positions of each field.

We explore this possibility with the i2Vector project.

Support for i128, i256, i512 Types

Parabix applications need long stream addition, subtraction and shift operations. There are standard ways of implementing these, including our parallel long-stream addition algorithm. Can these be integrated into LLVM?

The LongInteger project involves systematic support of the i256 type on LLVM, taking advantage of AVX2 instructions on the latest Intel Haswell chips.