Adam Husar
2014-Sep-17 07:44 UTC
[LLVMdev] Support of arbitrary bit-width types in LLVM backend
Hello everyone! We are currently trying to add support e.g. for 24-bitm or 40-bit integers to the LLVM backend. Such datatypes are very useful for diverse areas such as DSP applications, where the programmers and processor designers can optimize the area and power by using narrower data types. We already added attribute bitwidth support to the clang. This attribute specifies a bitwidth of an integer. We can share the implementation it if someone would be interested. Regarding the backend, it will be more complex, so I would like to ask for some guidelines and ideas, how can be this done. E.g. if there are some "tricks" how to add a variable-bitwidth integer type to the backend system, or it is better to add separate types for i24, i40, etc. Also, what should we be careful about. Thank you very much Adam