long_by_long_mulhi() rewritten and commented
John Rose
John.Rose at Sun.COM
Mon Feb 2 15:05:22 PST 2009
(Should have CC-ed the list...)
Begin forwarded message:
From: John Rose <john.rose at sun.com>
Date: February 2, 2009 2:54:51 PM PST
To: Christian Thalinger <Christian.Thalinger at Sun.COM>
Subject: Re: Request for review (XS): 6800154: Add comments to
long_by_long_mulhi() for better understandability
On Feb 2, 2009, at 9:40 AM, Christian Thalinger wrote:
> http://webrev.invokedynamic.info/twisti/6800154/
A couple of comments:
> + Node *v1 = phase->longcon(magic_const >> N / 2);
should be:
> + Node* v1 = phase->longcon(magic_const >> (N / 2));
We use parens liberally, especially when the operator precedences are
not from simple algebra.
Also (this is more of a judgement call for you) when renovating code,
I suggest moving toward the majority style "T* " instead of "T *", the
latter of which is peculiar to old opto code.
I spot-checked the details, but did not prove equivalence. I would
run a few test cases before and after the change, and look at the
disassembled code to be sure all is well.
Nice rewrite; thanks.
-- John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20090202/11d3f18b/attachment.html
More information about the hotspot-compiler-dev
mailing list