LLVM Clang Now Has Support For Custom-Width Integers With _ExtInt

Written by Michael Larabel in LLVM on 22 April 2020 at 01:36 PM EDT. 17 Comments
LLVM
While the C language committing is still evaluating adding N-bit integer support to the programming language, LLVM's Clang compiler has already added its experimental _ExtInt() implementation.

Rather than relying upon the common 16/32/64-bit integer types, ExtInt allows for using custom-width integers depending upon the needs of a particular variable. Like the C language proposal, the Clang ExtInt support has been led by Intel. It's taken a long time but as of recently in LLVM Git the support is in place.

One of the big motivators for this custom-width integer type support is for more efficient handling on FPGAs when not needing full-width integer types while the benefits are less for traditional processors.

For those interested in LLVM Clang's experimental ExtInt support for custom N-bit integer support, see the LLVM.org blog for more details on the initial implementation.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week