arrow
Return

Type Deduction Analysis: Reconstructing Transparent Pointer Types in LLVM-IR

delete2026-01-01
delete0
PRE
AI
N
Niccolò Nicolosi *
G
Gabriele Magnani
E
Emilio Corigliano
D
Davide Baroffio
F
Federico Reghenzani
G
Giovanni Agosta
DOI:10.1145/3771775.3786268delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
With version 17, LLVM finalized the transition to opaque pointer types, eliminating explicit pointee-type information from the Intermediate Representation (IR). Thus, starting from LLVM 17, each pointer type is represented in IR by the unique type ptr. Despite eliminating redundant pointer bitcasts and consequently reducing IR size and compile time, this change disrupts analyses that have reason to rely on pointee-type information, forcing existing compiler projects to depend on outdated LLVM versions. This information can in fact be insightful in fields like approximate computing, where the compiler can apply non-conservative optimizations, or in passes that require it to make analyses and transformations that do not impact the correctness of the program. To address this problem, we present a new Type Deduction Analysis pass that reconstructs transparent pointer types directly from opaque-pointer IR. Moreover, we illustrate two different case-studies on existing LLVM projects, namely TAFFO and ASPIS, that demonstrate the need for pointee-type information in LLVM compilers.
Keywords:
Compilers
LLVM
Data-flow Analysis
Types

Journal

P
PROCEEDINGS OF THE 35TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION, CC 2026
IF:
0
Papers:
18
Citations:
0

Organization

P
Polytechnic University of Milan
Scholars:
2.0W
Papers: 1.8W
Citations: 24