@hackage / llvm-extension

Processor specific intrinsics for the llvm interface

Latest0.0

About

Metadata

  • Last updated , by HenningThielemann
  • License BSD-3-Clause
  • Categories FFI, Compilers and Interpreters
  • Maintained by: Henning Thielemann <haskell@henning-thielemann.de>

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 8.8.1
  2. 8.6.5
  3. 8.4.4

Package Flags

Use the -f option with cabal commands to enable flags

    buildtools (off by default)

    Build intrinsic translator

    cpuid (on by default)

    Use CPUID for host feature detection if available on the architecture

Readme

The Low-Level Virtual-Machine is a compiler back-end with optimizer. You may also call it a high-level portable assembler. LLVM provides processor specific instructions via so-called intrinsics. This package allows you to use such instructions, while also defining fallbacks for older versions of a processor and different architectures.

We provide an auto-generated list of intrinsics for special SSE+AVX instructions on the X86 target. On x86 architectures we depend on the cpuid package for automatic detection of available features. This works when using JIT or native compilation, but it fails for cross-compilation.

Formerly, this package was part of the llvm-extra package. But the names of intrinsics change between LLVM versions without notification. Intrinsics for processor specific instructions are considered a last resort. In current LLVM versions all functions I needed so far are available as generic intrinsics.