Free Rider: A Source-Level Transformation Tool for Retargeting Platform-Specific Intrinsic Functions

Stanislav Manilov, Björn Franke, Anthony Magrath, Cedric Andrieu

Research output: Contribution to journalArticlepeer-review

Abstract / Description of output

Short-vector Simd and Dsp instructions are popular extensions to common Isas. These extensions deliver excellent performance and compact code for some compute-intensive applications, but they require specialized compiler support. To enable the programmer to explicitly request the use of such an instruction, many C compilers provide platform-specific intrinsic functions, whose implementation is handled specially by the compiler. The use of such intrinsics, however, inevitably results in nonportable code. In this article, we develop a novel methodology for retargeting such nonportable code, which maps intrinsics from one platform to another, taking advantage of similar intrinsics on the target platform. We employ a description language to specify the signature and semantics of intrinsics and perform graph-based pattern matching and high-level code transformations to derive optimized implementations exploiting the target’s intrinsics, wherever possible. We demonstrate the effectiveness of our new methodology, implemented in the Free Rider tool, by automatically retargeting benchmarks derived from OpenCV samples and a complex embedded application optimized to run on an Arm Cortex-M4 to an Intel Edison module with Sse4.2 instructions (and vice versa). We achieve a speedup of up to 3.73 over a plain C baseline, and on average 96.0% of the speedup of manually ported and optimized versions of the benchmarks.
Original languageEnglish
Article number38
Pages (from-to)1-24
Number of pages24
JournalACM Transactions on Embedded Computing Systems
Issue number2
Publication statusPublished - Jan 2017


Dive into the research topics of 'Free Rider: A Source-Level Transformation Tool for Retargeting Platform-Specific Intrinsic Functions'. Together they form a unique fingerprint.

Cite this