Handling Multi-Versioning in LLVM: Code Tracking and Cloning

Abstract : Instrumentation by sampling, adaptive computing and dynamic optimization can be efficiently implemented using multiple versions of a code region. Ideally, compilers should automatically handle the generation of such multiple versions. In this work we discuss the problem of multi-versioning in the situation where each version requires a different intermediate representation. We expose the limits of nowadays compilers regarding these aspects and provide our solutions to overcome them, using the LLVM compiler as our research platform. The paper is focused on three main aspects: tracking code in LLVM IR, cloning, and communication between low-level and high-level representations. Aiming at performance and minimal impact on the behavior of the original code, we describe our strategies to guide the interaction between the newly inserted code and the optimization passes, from annotating code using metadata to inlining assembly code in LLVM IR. Our target is performing code instrumentation and optimization, with an interest in loops. We build a version in x86_64 assembly code to acquire low-level information, and multiple versions in LLVM IR for performing high-level code transformations. The selection mechanism consists in callbacks to a generic runtime system. Preliminary results on the SPEC CPU 2006 and the Pointer Intensive Benchmark suite show that our framework has a negligible overhead in most cases, when instrumenting the most time consuming loop nests.
Type de document :
Communication dans un congrès
WIR 2011: Workshop on Intermediate Representations, in conjunction with CGO 2011, Apr 2011, Chamonix, France. 2011
Liste complète des métadonnées

Littérature citée [21 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/inria-00572785
Contributeur : Philippe Clauss <>
Soumis le : mercredi 5 octobre 2011 - 16:37:17
Dernière modification le : vendredi 12 janvier 2018 - 01:11:37
Document(s) archivé(s) le : vendredi 6 janvier 2012 - 02:20:12

Fichier

WIR.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : inria-00572785, version 1

Collections

Citation

Alexandra Jimborean, Vincent Loechner, Philippe Clauss. Handling Multi-Versioning in LLVM: Code Tracking and Cloning. WIR 2011: Workshop on Intermediate Representations, in conjunction with CGO 2011, Apr 2011, Chamonix, France. 2011. 〈inria-00572785〉

Partager

Métriques

Consultations de la notice

437

Téléchargements de fichiers

330