liu.seSearch for publications in DiVA
Planned maintenance
A system upgrade is planned for 17/11-2026, at 12:00-13:00. During this time DiVA will be unavailable.
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Superoptimization for the EMCA DSP: Adapting an LLVM IR Superoptimizer for a Production Compiler
Linköping University, Department of Computer and Information Science.
Linköping University, Department of Computer and Information Science.
2026 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Superoptimering för EMCA-DSP:n : Anpassning av en LLVM IR-Superoptimerare för Användning i en Produktionskompilator (Swedish)
Abstract [en]

Modern digital signal processors used in telecommunication infrastructure operate under strict performance, latency, and resource constraints, making compiler optimizations highly valuable. This thesis investigates how superoptimization can be adapted and integrated into the LLVM-based production compiler toolchain for the Ericsson Many Core Architecture Digital Signal Processor (EMCA DSP). The work focuses on identifying missed backend optimization opportunities in the compiler’s intermediate representation before final code generation, with particular attention to peephole optimizations, specialized DSP instructions, and the challenges introduced by a VLIW architecture. 

A prototype superoptimizer was developed by adapting the LLVM IR superoptimizer Souper to Ericsson’s internal compiler environment, Flacc. We evaluated the prototype on randomly selected EMCA DSP application files using static compiler metrics such as code size, instruction count, cycle count, and loop-weighted cycles, as well as dynamic benchmark measurements from simulation. 

The results show that superoptimization can discover optimization opportunities that the existing internal optimization layer misses. Under baseline Souper runs without specialized instructions enabled, we identified and verified 11 recurring peephole optimization patterns, spanning constant folding, algebraic simplification, redundancy elimination, and looped dependency removal; further distinctive patterns may remain discoverable with broader tracing. Across larger application-code experiments, the prototype produced consistent aggregate reductions in code size, instruction count, and cycle estimates. Support for selected specialized instructions, including multiply-accumulate and bit extraction operations, further improved the aggregate results, although some target-specific instructions caused regressions due to VLIW scheduling and parallelism constraints. Dynamic benchmarking confirmed a net performance improvement, but also showed that static cycle estimates only partially predict runtime behavior.

The thesis concludes that an integrated superoptimizer is useful as an offline analysis tool for discovering and validating backend optimizations in a production compiler. However, its direct use in normal compilation is limited by high SMT-solving cost, incomplete awareness of VLIW scheduling, register pressure, instruction-level parallelism, and differences between static and dynamic execution behavior.

Place, publisher, year, edition, pages
2026. , p. 75
Keywords [en]
Superoptimization, LLVM IR, Production Compiler, Peephole Optimization, Optimization, Digital Signal Processor, DSP, Very Long Instruction Word, VLIW, Satisfiability Modulo Theories, SMT, EMCA, Ericsson Many Core Architecture
Keywords [sv]
Superoptimering, LLVM IR, Produktionskompilator, Peephole-optimering, Kikhåls-optimering, Optimering, Digitalsignalprocessor, DSP, VLIW-arkitektur, SMT-lösare, EMCA, Ericsson Many Core Architecture
National Category
Embedded Systems
Identifiers
URN: urn:nbn:se:liu:diva-224951ISRN: LIU-IDA/LITH-EX-A--26/031--SEOAI: oai:DiVA.org:liu-224951DiVA, id: diva2:2072079
External cooperation
Ericsson AB
Subject / course
Computer science
Presentation
2026-06-05, KY23, Linköping, 10:15 (English)
Supervisors
Examiners
Available from: 2026-06-16 Created: 2026-06-15 Last updated: 2026-06-16Bibliographically approved

Open Access in DiVA

superoptimization_for_the_emca_dsp(1384 kB)83 downloads
File information
File name FULLTEXT01.pdfFile size 1384 kBChecksum SHA-512
ccd9f362fcf566050513f0987a2e25f1b1f38488715cce3db4e7aa0905c3e4816a3939c5d18d3c2ff5c1a0e366c2c08db1d3bdf7c6c21079c83b5b077b1fe3f5
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Karlsson, SimonKodanda Raju, Rohith
By organisation
Department of Computer and Information Science
Embedded Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 83 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 402 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • oxford
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf