Return
Type Deduction Analysis: Reconstructing Transparent Pointer Types in LLVM-IR
DOI:10.1145/3771775.3786268.png)
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
IF:
0
Papers:
18
Citations:
0

