Skip to content

SWORDIntel/DSLLVM

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

DSLLVM - DS LLVM Compiler

Version: 1.6.0 (Phase 3: High-Assurance) Repository: https://github.com/SWORDIntel/DSLLVM


πŸš€ Quick Links

Upstream LLVM

Security Articles

DSLLVM-Specific

Quick Start:

cd tpm2_compat
cmake -S . -B build -DENABLE_HARDWARE_ACCEL=ON
cmake --build build

πŸ“¦ Building DSLLVM

Quick Install (Recommended)

Automated installer - Builds and installs DSLLVM, replacing system LLVM:

# System-wide installation (requires sudo)
sudo ./build-dsllvm.sh

# Install to custom prefix (no sudo needed)
./build-dsllvm.sh --prefix /opt/dsllvm

# See all options
./build-dsllvm.sh --help

The installer automatically:

  • βœ… Checks prerequisites
  • βœ… Backs up existing LLVM installation
  • βœ… Builds DSLLVM with all DSMIL features
  • βœ… Creates system symlinks (clang β†’ dsmil-clang, etc.)
  • βœ… Sets up environment configuration
  • βœ… Verifies installation

Build Types:

  • Release (default): Optimized production build, faster execution, larger binaries
  • Debug: Full debug symbols, assertions enabled, slower execution, easier debugging
  • RelWithDebInfo: Optimized with debug info, good for profiling
  • MinSizeRel: Optimized for smallest binary size

Manual Build

Prerequisites

sudo apt-get install -y build-essential cmake ninja-build python3 git libssl-dev

Build LLVM/Clang + DSMIL

cmake -G Ninja -S llvm -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS="clang;lld" \
  -DLLVM_ENABLE_DSMIL=ON \
  -DLLVM_TARGETS_TO_BUILD="X86"

ninja -C build

Build TPM2 Library

cd tpm2_compat
cmake -S . -B build -DENABLE_HARDWARE_ACCEL=ON
cmake --build build -j$(nproc)

What DSLLVM Is

DSLLVM is a standard LLVM/Clang toolchain with additional telemetry and metadata collection capabilities.

  • Keeps the standard LLVM/Clang toolchain behaviour;
  • Adds optional telemetry hooks for build and compilation metrics;
  • Can be used as a regular clang/lld toolchain with enhanced observability.

If you already know LLVM, you can treat DSLLVM as "LLVM with extra telemetry" rather than a new compiler.


Highlights

  • βœ… LLVM-first design

    • Tracks upstream LLVM closely; core passes and IR semantics are unchanged.
    • Can be used as a regular clang/lld toolchain.
  • πŸ“Š Telemetry and metadata collection

    • Build artefacts can carry compact telemetry metadata for:
      • performance/size profiles,
      • compilation metrics,
      • build-time observability.
    • Optional and encoded as normal IR / object metadata.

What DSLLVM Is (and Is Not)

Is:

  • A minimally invasive extension layer on top of LLVM/Clang/LLD.
  • A way to collect telemetry during compilation.
  • A place to keep build metrics and metadata close to the code that produced the binaries.

Is not:

  • Not a new IR or language.
  • Not a replacement for upstream security guidance or crypto libraries.
  • Not a mandatory runtime or kernel – it's "just" the compiler side with telemetry.

Building & Using DSLLVM

Recommended: Use the automated installer (./build-dsllvm.sh) for a complete build and system integration. See the Build Guide for details.

DSLLVM follows the standard LLVM build flow:

  1. Configure with CMake (out-of-tree build directory).
  2. Build with Ninja or Make.
  3. Use clang/clang++/lld as usual.

If you don’t enable any DSMIL/AI options, DSLLVM behaves like a regular LLVM toolchain.


Status

  • Core compiler functionality: βœ… usable
  • Telemetry and metadata collection: βœ… stable
  • Downstream integrations: out of scope for this repo

For most users, DSLLVM can be dropped in as "LLVM with extra telemetry" and left at that.

πŸ“š Documentation

Note: DSMIL documentation is ignored in this repository and not included in builds.

Upstream DSMIL Stack Quantum Ready PQC Profile AI-Integrated

About

DSLLVM

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 64.0%
  • C 26.8%
  • MLIR 3.0%
  • Python 1.7%
  • Fortran 1.5%
  • FIRRTL 0.6%
  • Other 2.4%