arrow
Return

Speculative Recursion Unrolling

delete2026-01-01
delete0
PRE
AI
T
Tim Heldmann *
T
Tim Ziegler
P
Peter Arzt
C
Christian Bischof
DOI:10.1007/978-3-032-07612-0_23delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
In this paper, we propose a novel, annotation based approach to optimize recursive functions in C/C++ codes. It can be used to fully remove recursive structures, optimize the working pattern and gives the developer fine grain control over inlining behavior, leading to speedups of up to 40x. To achieve this we use Clang annotations and have developed an LLVM compiler pass that parses the developer given annotation and transforms the code accordingly. We demonstrate the effectiveness of this approach on 5 well known recursive algorithms. Our experiments show, that recursive functions that are not limited by memory bandwidth but computation intensity benefit the most from this optimization. Our code is available at https://github.com/tudasc/SpecRecUnroll.
Keywords:
Recursion Optimization
Unrolling
LLVM

Journal

H
HIGH PERFORMANCE COMPUTING WORKSHOPS, ISC HIGH PERFORMANCE 2025 INTERNATIONAL WORKSHOPS
IF:
0
Papers:
54
Citations:
0

Organization

T
Technical University of Darmstadt
Scholars:
1.3W
Papers: 10.0K
Citations: 1.2W