llvm-dimeta: A library for extracting source-level type information in LLVM IR using debug metadata

LLVM frontends like Clang preserve source-level type information in the intermediate representation (IR) primarily through debug metadata. Although intended for debuggers, this metadata benefits compiler tools like sanitizers, which need type information of stack, heap and global allocations for tasks such as verifying memory safety. We present llvm-dimeta, a library that extracts type information for memory allocations directly from LLVM IR via debug metadata. It handles the necessary IR analysis internally, enabling frontend-independent type queries. As a case study, we integrate llvm-dimeta into a type correctness checker for MPI-parallelized HPC applications. Using llvm-dimeta, the checker achieves 98% accuracy on an MPI correctness benchmark, up from 76% when relying solely on LLVM IR’s more limited type system. Code is available at https://github.com/ahueck/llvm-dimeta

Authors

Institutions

Publication Details

Published
2025-09-08
DOI
https://doi.org/10.1109/scam67354.2025.00019
Primary Topic
Advanced Computational Techniques and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

llvm-dimeta: A library for extracting source-level type information in LLVM IR using debug metadata

Christian Bischof, Sebastian Kreutzer, Alexander Hück
Advanced Computational Techniques and Applications
article

llvm-dimeta: A library for extracting source-level type information in LLVM IR using debug metadata

Christian Bischof, Sebastian Kreutzer, Alexander Hück
article en

Abstract

LLVM frontends like Clang preserve source-level type information in the intermediate representation (IR) primarily through debug metadata. Although intended for debuggers, this metadata benefits compiler tools like sanitizers, which need type information of stack, heap and global allocations for tasks such as verifying memory safety. We present llvm-dimeta, a library that extracts type information for memory allocations directly from LLVM IR via debug metadata. It handles the necessary IR analysis internally, enabling frontend-independent type queries. As a case study, we integrate llvm-dimeta into a type correctness checker for MPI-parallelized HPC applications. Using llvm-dimeta, the checker achieves 98% accuracy on an MPI correctness benchmark, up from 76% when relying solely on LLVM IR’s more limited type system. Code is available at https://github.com/ahueck/llvm-dimeta

Technische Universität Darmstadt (DE)
Openalex Percentile: Top 85%
Advanced Computational Techniques and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

llvm-dimeta: A library for extracting source-level type information in LLVM IR using debug metadata — Christian Bischof, Sebastian Kreutzer, et al. · (2025) | TGRS Research Map | TGRS