search query: @keyword kääntäjä / total: 15
reference: 1 / 15
« 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 Centre

In 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

  • Aalto University staff members log on to the customer computer using the Aalto username and password.
  • Other customers log on using a shared username and password.

Opening a thesis

  • On the desktop of the customer computers, you will find an icon titled:

    Aalto Thesis Database

  • Click on the icon to search for and open the thesis you are looking for from Aaltodoc database. You can find the thesis file by clicking the link on the OEV or OEVS field.

Reading the thesis

  • You can either print the thesis or read it on the customer computer screen.
  • You cannot save the thesis file on a flash drive or email it.
  • You cannot copy text or images from the file.
  • You cannot edit the file.

Printing the thesis

  • You can print the thesis for your personal study or research use.
  • Aalto University students and staff members may print black-and-white prints on the PrintingPoint devices when using the computer with personal Aalto username and password. Color printing is possible using the printer u90203-psc3, which is located near the customer service. Color printing is subject to a charge to Aalto University students and staff members.
  • Other customers can use the printer u90203-psc3. All printing is subject to a charge to non-University members.
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