webrev for HSAIL backend Math intrinsics support

Doug Simon doug.simon at oracle.com
Fri Dec 13 01:45:36 PST 2013


I’ve integrated this patch and am pushing it through now.

Apart from some cosmetic touch ups, I also made the node intrinsics in HSAILMathSubstitutions native. This is the best way to keep the Java compiler happy while failing fast should those methods ever be interpreted as a result of deoptimization.

-Doug

On Dec 12, 2013, at 8:35 PM, Venkatachalam, Vasanth <Vasanth.Venkatachalam at amd.com> wrote:

> 
> Hi,
> 
> I've uploaded a webrev that adds support to the HSAIL backend for intrinsifying some of the java.lang.Math routines.
> 
> http://cr.openjdk.java.net/~tdeneau/webrev-mathintrinsics05/webrev/
> 
> Please review and provide feedback. When ready for commit, please commit it in my name.
> 
> Implementation Notes:
> 
> 
> 1)      The java.lang.Math routines that are covered in this webrev include Math.sqrt, Math.abs, Math.rint, Math.floor, and Math.ceil.
> 
> Based on the HSAIL spec and the precision requirements of Java these are the most straightforward to implement.
> 
> 2)      The main changes are the addition of an HSAILMathSubstitutions class and an HSAILMathIntrinsicNode to define the new intrinsics, and supporting changes in HSAILLIRGenerator and HSAILArithmetic to handle the code generation.
> 
> 3)      Test cases have been included for testing each of the intrinsics included in this webrev. The tests exercise positive and negative values as well as corner cases mentioned in the java.lang.Math spec for the above five routines.
> 
> Vasanth



More information about the graal-dev mailing list