Improving Code Density with Variable Length Encoding Aware Instruction Scheduling

Heikki Kultala, Timo Viitanen, Pekka Jääskeläinen, Janne Helkala, Jarmo Takala

    Research output: Contribution to journalArticleScientificpeer-review

    9 Downloads (Pure)


    Variable length encoding can considerably decrease code size in VLIW processors by reducing the number of bits wasted on encoding No Operations(NOPs). A processor may have different instruction templates where different execution slots are implicitly NOPs, but all combinations of NOPs may not be supported by the instruction templates. The efficiency of the NOP encoding can be improved by the compiler trying to place NOPs in such way that the usage of implicit NOPs is maximized. Two different methods of optimizing the use of the implicit NOP slots are evaluated: (a) prioritizing function units that have fewer implicit NOPs associated with them and (b) a post-pass to the instruction scheduler which utilizes the slack of the schedule by rescheduling operations with slack into different instruction words so that the available instruction templates are better utilized. Three different methods for selecting basic blocks to apply FU priorization on are also analyzed: always, always outside inner loops, and only outside inner loops only in basic blocks after testing where it helped to decrease code size. The post-pass optimizer alone saved an average of 2.4 % and a maximum of 10.5 % instruction memory, without performance loss. Prioritizing function units in only those basic blocks where it helped gave the best case instruction memory savings of 10.7 % and average savings of 3.0 % in exchange for an average 0.3 % slowdown. Applying both of the optimizations together gave the best case code size decrease of 12.2 % and an average of 5.4 %, while performance decreased on average by 0.1 %.
    Original languageEnglish
    Pages (from-to)435-446
    Number of pages12
    JournalJournal of Signal Processing Systems
    Issue number3
    Early online date7 Dec 2015
    Publication statusPublished - Sept 2016
    Publication typeA1 Journal article-refereed

    Publication forum classification

    • Publication forum level 1


    Dive into the research topics of 'Improving Code Density with Variable Length Encoding Aware Instruction Scheduling'. Together they form a unique fingerprint.

    Cite this