[LLVMdev] NEON vector instructions and the fast math IR flags

David Tweed David.Tweed at arm.com
Mon Jun 10 09:11:25 PDT 2013


> Secondly, I think it would be helpful to at least try to map out which "optimizations" are going to be viewed by a per-instruction IR flag just in order to get a clearer idea if the global stuff is the right model. (Amongst other things, I'm interested in DSLs where the likelihood of knowing something about the "ideal requirements" for operations that will be transformed into LLVM IR is higher than for manually written C/Fortran.)

| Sorry, I did not get this sentence. Would you mind rephrasing it?

| At the moment I am mainly concerned of the code generation aspect.
| Optimizations on LLVM-IR can already reason per-instruction about
| several floating point precision flags. Doing this during code
| generation is apparently difficult as we would have to decide per
| instruction if we can legally lower it to NEON or not.

I was being a bit unclear. I was thinking that in general it's often the case that one doesn't have one opinion about a given aspect of floating point, but that it matters in some cases (ie, denormals are very useful in code which will be doing a division by a subtraction, whereas in many areas denormals are not a concernt.) So I was thinking it would be helpful to figure out how this would work on a per-IR-instruction basis first, even if from manpower concerns dealing with a simple global flag was going to be implemented first. However, talking to someone who does some numerical coding it seems quite rare to have code which is actually understood and annotated to that level of detail, so I think as a practical matter this isn't worth pursuing since it would be unlikely to be used.

Cheers,
Dave

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.





More information about the llvm-dev mailing list