skip to main content
10.1145/3339186.3339193acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicppConference Proceedingsconference-collections
research-article

Devise Rust Compiler Optimizations on RISC-V Architectures with SIMD Instructions

Published: 05 August 2019 Publication History

Abstract

Recently, Rust has become a popular system programming language and been widely used in microkernel OS designs, cryptocurrency designs, deep learning applications, and web browsers. Rust is designed for highly safe and concurrent systems and provides similar performance to C++. In the architecture work, RISC-V is with an open instruction set architecture in growing use due to its performance, power efficiency, and open architectures. Extension of ISAs in RISC-V is another advantage. Venders can select the extension ISAs to make the design more flexible. There is SIMD extension ISAs called "V" extension in RISC-V. However, currently Rust was not well-supported on RISC-V platforms. In this paper, we describe how to enable the Rust flow and framework based on LLVM infrastructure for RISC-V architectures with SIMD V extensions. For the basic infrastructure support, we enable two flows for RISC-V architecture. In addition, we also enable RISC-V SIMD instructions for Rust SIMD vector with LLVM support. In the experiment, we illustrate our code generation for Blas style matrix and vector computations for Rust on RISC-V V instructions. The experiment is run on the spike simulator which we implement the V extension for RISC-V architectures.

References

[1]
2004. BLAS (Basic Linear Algebra Subprograms). http://www.netlib.org/blas/.
[2]
2008. Cortex-A9 NEON Media Processing Engine Technical Reference Manual. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0409h/BABFGFDD.html.
[3]
2010. RISC-V. https://riscv.org/.
[4]
2016. IRON: An Extensible, Concurrent Web Framework for Rust. http://ironframework.io/.
[5]
2017. Rust for the hifive(RV32LMAC) board. https://github.com/riscv-rust/riscv-rust-toolchain.
[6]
2018. riscv-v-spec. https://github.com/riscv/riscv-v-spec.
[7]
Andestech. 2017. Open Source RISC-V LLVM Toolchain. https://github.com/andestech/riscv-llvm-toolchain.
[8]
Nathan Binkert, Bradford Beckmann, Gabriel Black, Steven K. Reinhardt, Ali Saidi, Arkaprava Basu, Joel Hestness, Derek R. Hower, Tushar Krishna, Somayeh Sardashti, Rathijit Sen, Korey Sewell, Muhammad Shoaib, Nilay Vaish, Mark D. Hill, and David A. Wood. 2011. The Gem5 Simulator. SIGARCH Comput. Archit. News 39, 2 (Aug. 2011), 1--7.
[9]
M. Hung, P. Chen, Y. Hwang, R. D. Ju, and J. Lee. 2012. Support of Probabilistic Pointer Analysis in the SSA Form. IEEE Transactions on Parallel and Distributed Systems 23, 12, 2366--2379.
[10]
Jenq-Kuen Lee, Allen Lu, Yuan-Ming Chang, Chao-Lin Lee, Piyo Chen, and Shao-Chung Wang. 2018. Supporting TVM on RISC-V Architectures. https://sampl.cs.washington.edu/tvmconf/.
[11]
Allen Lu, Chao-Lin Lee, Yuan-Ming Chang, Piyo Chen, Hsiang-Wei Sung, Heng Lin, Shao-Chung Wang, and Jenq-Kuen Lee. 2019. Enabling TVM on RISC-V Architectures with SIMD Instructions. https://riscv.org/2019/03/risc-v-workshop-taiwan-proceedings/.
[12]
Mozilla. 2006. Rust. https://www.rust-lang.org/.
[13]
RISC-V Foundation. 2014. Open source RISC-V GNU Compiler Toolchain. https://github.com/riscv/riscv-gnu-toolchain.
[14]
Jeremy Soller. 2015. Redox: A Rust Operating System. https://www.redox-os.org/.
[15]
Shao-Chung Wang, Li-Chen Kan, Chao-Lin Lee, Yuan-Shin Hwang, and Jenq-Kuen Lee. 2017. Architecture and Compiler Support for GPUs Using Energy-Efficient Affine Register Files. ACM Trans. Des. Autom. Electron. Syst. 23, 2, Article 18, 25 pages.

Cited By

View all
  • (2024)Case Study: Optimization Methods With TVM Hybrid-OP on RISC-V Packed SIMDIEEE Access10.1109/ACCESS.2024.339719512(64193-64211)Online publication date: 2024
  • (2023)RISC-V ISA Extension Toolchain Supports: A SurveyProceedings of the 2023 4th International Conference on Computing, Networks and Internet of Things10.1145/3603781.3603942(924-929)Online publication date: 26-May-2023
  • (2022)A Multi-target, Multi-paradigm DSL Compiler for Algorithmic Graph ProcessingProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567513(2-15)Online publication date: 29-Nov-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ICPP Workshops '19: Workshop Proceedings of the 48th International Conference on Parallel Processing
August 2019
241 pages
ISBN:9781450371964
DOI:10.1145/3339186
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

In-Cooperation

  • University of Tsukuba: University of Tsukuba

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 August 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. LLVM
  2. RISC-V
  3. Rust
  4. SIMD
  5. bare metal

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

ICPP 2019
ICPP 2019: Workshops
August 5 - 8, 2019
Kyoto, Japan

Acceptance Rates

Overall Acceptance Rate 91 of 313 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)23
  • Downloads (Last 6 weeks)3
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Case Study: Optimization Methods With TVM Hybrid-OP on RISC-V Packed SIMDIEEE Access10.1109/ACCESS.2024.339719512(64193-64211)Online publication date: 2024
  • (2023)RISC-V ISA Extension Toolchain Supports: A SurveyProceedings of the 2023 4th International Conference on Computing, Networks and Internet of Things10.1145/3603781.3603942(924-929)Online publication date: 26-May-2023
  • (2022)A Multi-target, Multi-paradigm DSL Compiler for Algorithmic Graph ProcessingProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567513(2-15)Online publication date: 29-Nov-2022
  • (2020)Experiments and optimizations for TVM on RISC-V Architectures with P Extension2020 International Symposium on VLSI Design, Automation and Test (VLSI-DAT)10.1109/VLSI-DAT49148.2020.9196477(1-4)Online publication date: Aug-2020

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media