Table of Contents
Fetching ...

PrETi: Predicting Execution Time in Early Stage with LLVM and Machine Learning

Risheng Xu, Philipp Sieweck, Hermann von Hasseln, Dirk Nowotka

TL;DR

Preti addresses the need for early-stage, accurate execution-time prediction in safety-critical real-time software by combining LLVM IR instrumentation with execution-flow, data-cache, and branch simulations, followed by ML-based time prediction trained on historical measurements. It introduces a two-component pipeline: preti_llvm for instrumented IR-based traces and preti_ml for learning from those traces, evaluated on a dataset of 1348 samples and achieving approximately 12% APE on public benchmarks. The approach outperforms state-of-the-art timing-prediction methods such as CATREEN and ITHEMAL while drastically reducing measurement workload. The work provides a scalable, hardware-independent pathway for ESTA, enabling faster iteration, better scheduling, and earlier debugging in real-time software development.

Abstract

We introduce preti, a novel framework for predicting software execution time during the early stages of development. preti leverages an LLVM-based simulation environment to extract timing-related runtime information, such as the count of executed LLVM IR instructions. This information, combined with historical execution time data, is utilized to train machine learning models for accurate time prediction. To further enhance prediction accuracy, our approach incorporates simulations of cache accesses and branch prediction. The evaluations on public benchmarks demonstrate that preti achieves an average Absolute Percentage Error (APE) of 11.98\%, surpassing state-of-the-art methods. These results underscore the effectiveness and efficiency of preti as a robust solution for early-stage timing analysis.

PrETi: Predicting Execution Time in Early Stage with LLVM and Machine Learning

TL;DR

Preti addresses the need for early-stage, accurate execution-time prediction in safety-critical real-time software by combining LLVM IR instrumentation with execution-flow, data-cache, and branch simulations, followed by ML-based time prediction trained on historical measurements. It introduces a two-component pipeline: preti_llvm for instrumented IR-based traces and preti_ml for learning from those traces, evaluated on a dataset of 1348 samples and achieving approximately 12% APE on public benchmarks. The approach outperforms state-of-the-art timing-prediction methods such as CATREEN and ITHEMAL while drastically reducing measurement workload. The work provides a scalable, hardware-independent pathway for ESTA, enabling faster iteration, better scheduling, and earlier debugging in real-time software development.

Abstract

We introduce preti, a novel framework for predicting software execution time during the early stages of development. preti leverages an LLVM-based simulation environment to extract timing-related runtime information, such as the count of executed LLVM IR instructions. This information, combined with historical execution time data, is utilized to train machine learning models for accurate time prediction. To further enhance prediction accuracy, our approach incorporates simulations of cache accesses and branch prediction. The evaluations on public benchmarks demonstrate that preti achieves an average Absolute Percentage Error (APE) of 11.98\%, surpassing state-of-the-art methods. These results underscore the effectiveness and efficiency of preti as a robust solution for early-stage timing analysis.

Paper Structure

This paper contains 28 sections, 4 equations, 2 figures, 5 tables.

Figures (2)

  • Figure 1: The Overview of preti framework
  • Figure 2: Execution Time vs. Number of Executed IR Instructions