Handling Multi-Versioning in LLVM: Code Tracking and Cloning - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2011

Handling Multi-Versioning in LLVM: Code Tracking and Cloning

Résumé

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.
Fichier principal
Vignette du fichier
WIR.pdf (1.98 Mo) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

inria-00572785 , version 1 (05-10-2011)

Identifiants

  • HAL Id : inria-00572785 , version 1

Citer

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, Florent Bouchez, Sebastian Hack, Eelco Visser, Apr 2011, Chamonix, France. ⟨inria-00572785⟩

Collections

CNRS INRIA INRIA2
355 Consultations
614 Téléchargements

Partager

Gmail Facebook X LinkedIn More