Pydrofoil: accelerating Sail-based instruction set simulators

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Bolz-Tereick, Carl Friedrich, Panayi, Luke, McKeogh, Ferdia, Spink, Tom, Berger, Martin
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912262497763328
author Bolz-Tereick, Carl Friedrich
Panayi, Luke
McKeogh, Ferdia
Spink, Tom
Berger, Martin
author_facet Bolz-Tereick, Carl Friedrich
Panayi, Luke
McKeogh, Ferdia
Spink, Tom
Berger, Martin
contents We present Pydrofoil, a multi-stage compiler that generates instruction set simulators (ISSs) from processor instruction set architectures (ISAs) expressed in the high-level, verification-oriented ISA specification language Sail. Pydrofoil shows a > 230x speedup over the C-based ISS generated by Sail on our benchmarks, and is based on the following insights. (i) An ISS is effectively an interpreter loop, and tracing just-in-time (JIT) compilers have proven effective at accelerating those, albeit mostly for dynamically typed languages. (ii) ISS workloads are highly atypical, dominated by intensive bit manipulation operations. Conventional compiler optimisations for general-purpose programming languages have limited impact for speeding up such workloads. We develop suitable domain-specific optimisations. (iii) Neither tracing JIT compilers, nor ahead-of-time (AOT) compilation alone, even with domain-specific optimisations, suffice for the generation of performant ISSs. Pydrofoil therefore implements a hybrid approach, pairing an AOT compiler with a tracing JIT built on the meta-tracing PyPy framework. AOT and JIT use domain-specific optimisations. Our benchmarks demonstrate that combining AOT and JIT compilers provides significantly greater performance gains than using either compiler alone.
format Preprint
id arxiv_https___arxiv_org_abs_2503_04389
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Pydrofoil: accelerating Sail-based instruction set simulators
Bolz-Tereick, Carl Friedrich
Panayi, Luke
McKeogh, Ferdia
Spink, Tom
Berger, Martin
Programming Languages
We present Pydrofoil, a multi-stage compiler that generates instruction set simulators (ISSs) from processor instruction set architectures (ISAs) expressed in the high-level, verification-oriented ISA specification language Sail. Pydrofoil shows a > 230x speedup over the C-based ISS generated by Sail on our benchmarks, and is based on the following insights. (i) An ISS is effectively an interpreter loop, and tracing just-in-time (JIT) compilers have proven effective at accelerating those, albeit mostly for dynamically typed languages. (ii) ISS workloads are highly atypical, dominated by intensive bit manipulation operations. Conventional compiler optimisations for general-purpose programming languages have limited impact for speeding up such workloads. We develop suitable domain-specific optimisations. (iii) Neither tracing JIT compilers, nor ahead-of-time (AOT) compilation alone, even with domain-specific optimisations, suffice for the generation of performant ISSs. Pydrofoil therefore implements a hybrid approach, pairing an AOT compiler with a tracing JIT built on the meta-tracing PyPy framework. AOT and JIT use domain-specific optimisations. Our benchmarks demonstrate that combining AOT and JIT compilers provides significantly greater performance gains than using either compiler alone.
title Pydrofoil: accelerating Sail-based instruction set simulators
topic Programming Languages
url https://arxiv.org/abs/2503.04389