[cfe-dev] About ComplexExprEmitter
Shixiong Xu via cfe-dev
cfe-dev at lists.llvm.org
Wed Sep 21 02:58:41 PDT 2016
I am working on hardware support for complex floating-point numbers. I noticed that ComplexExprEmitter in Clang directly decomposes complex numbers in order to perform arithmetic operations such as add, sub. If the target has special float/double complex data types and a set of instructions to achieve the complex operations, what's the best way of utilizing these instructions? I guess only relying on the LLVM backend to do the instruction selection is not a good idea because the complex data types are represented as a record in LLVM IR. I am thinking of implementing another ExprEmitter, say HardwareComplexExprEmitter, to convert Clang complex types into target specific complex types, and related operations into intrinsic calls. But the disadvantages are 1) vectorizer won't be able to vectorize the transformed code without extensions and 2) it hurts the portability of code. Any suggestions? Thanks.
Shixiong (Jason) Xu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev