Optimizing byte reverse code for int value (original) (raw)

White, Derek Derek.White at cavium.com
Thu May 11 18:33:18 UTC 2017


Hi Michihiro,

Not a jdk8u reviewer OR C2 expert, but a possible simplification:

I think a tree like:

// AndI // /\ // LoadB ConI(255)

will get turned into a LoadUBNode, via AndINode::Ideal() and AndINode::Identity(). It certainly should, considering how often this code pattern is used!

If so, you should be able to simplify your pattern matching greatly.

-----Original Message----- From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On Behalf Of Andrew Haley Sent: Thursday, May 11, 2017 5:02 AM To: Michihiro Horie <HORIE at jp.ibm.com>; Doerr, Martin <martin.doerr at sap.com> Cc: ppc-aix-port-dev at openjdk.java.net; hotspot-dev at openjdk.java.net; Hiroshi H Horii <HORII at jp.ibm.com>; Simonis, Volker <volker.simonis at sap.com> Subject: Re: Optimizing byte reverse code for int value

On 11/05/17 07:46, Michihiro Horie wrote:

Thanks a lot for your helpful comments. I fixed my code. http://cr.openjdk.java.net/~horii/8178294/webrev.06/

@Andrew: Do you think this is the right way to do it and is there a chance to get it in jdk8u? Andrew, I would be grateful if you would approve this change for jdk8u.

The list of jdk8u reviewers is at http://openjdk.java.net/census#jdk8u. You'll want someone who is on the HotSpot team.

I have mixed feelings about this patch. It seems too specific to me: if you had something that would work with any integer type it would be more useful, I feel. And - generally speaking - the rule is that patches go into JDK 9 first, but JDK 9 is closed for enhancements.

So, I'm sorry for the bad news. Your patch looks interesting and useful but I do not know how to get it committed.

Andrew.



More information about the hotspot-dev mailing list