search query: @keyword data compression / total: 4
reference: 1 / 4
« previous | next »
Author: | Lindfors, Timo Juhani |
Title: | Compression-friendly Encoding for LLVM Intermediate Representation |
Pakkausystävällinen koodaus LLVM:n välikielelle | |
Publication type: | Master's thesis |
Publication year: | 2014 |
Pages: | 68 + 9 Language: eng |
Department/School: | Perustieteiden korkeakoulu |
Main subject: | Ohjelmistotekniikka (T3001) |
Supervisor: | Saikkonen, Heikki |
Instructor: | Hirvisalo, Vesa |
Electronic version URL: | http://urn.fi/URN:NBN:fi:aalto-201406252200 |
OEVS: | Electronic archive copy is available via Aalto Thesis Database.
Instructions Reading digital theses in the closed network of the Aalto University Harald Herlin Learning CentreIn the closed network of Learning Centre you can read digital and digitized theses not available in the open network. The Learning Centre contact details and opening hours: https://learningcentre.aalto.fi/en/harald-herlin-learning-centre/ You can read theses on the Learning Centre customer computers, which are available on all floors.
Logging on to the customer computers
Opening a thesis
Reading the thesis
Printing the thesis
|
Location: | P1 Ark Aalto 1716 | Archive |
Keywords: | LLVM compiler intermediate representation bitcode byte-code data compression kääntäjä välikieli bitcode tavukoodi tiedonpakkaus |
Abstract (eng): | Distributing software in compiler intermediate representation (IR) instead of native code offers new possibilities for optimization. When IR for the whole program and its dependencies is available at the target system we can use simple but effective install-time optimizations such as constant propagation across library boundaries. Since we know the exact CPU instruction set we can also generate code that optimally matches the target system. Finally, we can execute the software using a just-in-time compiling (JIT) interpreter that can benefit from locally generated profiling information. Unfortunately the bitcode format that is used to encode the IR of the popular LLVM compiler takes more space than native code. This is mostly because it has been designed to be seekable to allow execution of code without having to read the whole bitcode file. Seekability is a useful property but it is not needed in a software distribution format. Bitcode is also bit oriented which confuses most byte oriented compression tools. We present a new compression-friendly wire format for the LLVM IR. We compiled 3511 real-world programs from the Debian archive and observed that on average we only need 68% of the space used by gzipped bitcode. Our format achieves this by using two simple ideas. First, it separates similar information to different byte streams to make gzip's job easier. Second, it uses relative dominator-scoped indexing for value references to ensure that locally similar basic blocks stay similar even when they are inside completely different functions. |
Abstract (fin): | Tietokoneohjelmien levittäminen välikielimuodossa (IR) tarjoaa uusia optimointimahdollisuuksia. Esimerkiksi kun ohjelman ja sen käyttämien ohjelmakirjastojen IR on saatavilla ohjelmaa asennettaessa voidaan vakiolausekkeita sieventää kirjastorajojen yli. Koska ohjelmaa asennettaessa tunnetaan kohdejärjestelmän tarkka käskykanta voidaan IR:stä kääntää natiivikoodia, joka sopii mahdollisimman hyvin kohdejärjestelmälle. Lopulta voimme käyttää IR-muodossa olevien ohjelmien suorittamiseen JIT-kääntäjää, joka voi hyödyntää paikallisessa suorituksessa kerättyä profilointitietoa. Valitettavasti suositun LLVM-kääntäjän käyttämän IR:n bitcode-koodaus tarvitsee natiivikoodia enemmän tilaa. Tämä johtuu osin siitä, että se on suunniteltu tukemaan koodin osittaista suorittamista ilman, että tulkin tarvitsee lukea bitcode-tiedostoa kokonaan ennen suorituksen alkua. Tämä on hyödyllinen suunnittelupäätös, mutta siitä ei ole hyötyä ohjelmia levitettäessä. Bitcode on myös rakenteeltaan bittivirta, mikä vaikeuttaa tavuvirtoihin suunniteltujen tavallisten pakkausohjelmien työtä. Esitämme tässä työssä LLVM:n IR:lle uuden koodauksen, joka soveltuu paremmin pakkausohjelmien syötteeksi. Käänsimme 3511 oikeaa ohjelmaa Debian-arkistosta ja havaitsimme, että koodauksemme tarvitsee vain 68% bitcode-koodauksen tarvitsemasta tilasta, kun molemmat koodaukset on pakattu gzip-ohjelmalla. Tuloksen takana on kaksi yksinkertaista ideaa. Ensin samankaltainen tieto jaetaan omiin tavuvirtoihin gzipin työn helpottamiseksi. Sitten arvojen välillä käytetään suhteellisia viittauksia, jotka on rajattu näkyvyystiedon perusteella niin, että eri funktioissa esiintyvät paikallisesti samankaltaiset peruslohkot näyttävät samankaltaisilta myös gzipin näkökulmasta. |
ED: | 2014-08-03 |
INSSI record number: 49418
+ add basket
« previous | next »
INSSI