This patch intends to replace CL 6446088 and CL 6459046 by eliminating short integer instructions ...
12 years, 11 months ago
(2012-08-11 12:22:46 UTC)
#2
This patch intends to replace CL 6446088 and CL 6459046 by eliminating short
integer instructions whenever possible. It passes the tests but can cause more
issues: there were some with the carry bit (needc is not complete) and a use of
ORB with arguments being actual ints and not bytes (in the uint64 -> float64
conversion).
LGTM http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c File src/cmd/6g/peep.c (right): http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c#newcode499 src/cmd/6g/peep.c:499: // TODO: also consider eliminating 32-bit ops? You ...
12 years, 10 months ago
(2012-09-01 14:10:41 UTC)
#8
LGTM
http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c
File src/cmd/6g/peep.c (right):
http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c#newcode499
src/cmd/6g/peep.c:499: // TODO: also consider eliminating 32-bit ops?
You can drop this TODO. The problem with the byte and word ops is that they are
defined to preserve the high bits of the destination register, meaning that even
though _we_ don't care, the processor must treat the destination as an
additional input where it might otherwise not be (especially for MOV, less so
for this arithmetic). That constrains register renaming which makes operations
less fast than they might otherwise be. The 32-bit ops do not have this problem
because they are defined to clear the top 32 bits of the destination register
always.
*** Submitted as http://code.google.com/p/go/source/detail?r=79225d9f3ced *** cmd/6g, cmd/8g: eliminate short integer arithmetic when possible. Fixes issue ...
12 years, 10 months ago
(2012-09-01 14:41:02 UTC)
#9
*** Submitted as http://code.google.com/p/go/source/detail?r=79225d9f3ced ***
cmd/6g, cmd/8g: eliminate short integer arithmetic when possible.
Fixes issue 3909.
Fixes issue 3910.
R=rsc, nigeltao
CC=golang-dev
http://codereview.appspot.com/6442114http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c
File src/cmd/6g/peep.c (right):
http://codereview.appspot.com/6442114/diff/15001/src/cmd/6g/peep.c#newcode499
src/cmd/6g/peep.c:499: // TODO: also consider eliminating 32-bit ops?
On 2012/09/01 14:10:41, rsc wrote:
> You can drop this TODO. The problem with the byte and word ops is that they
are
> defined to preserve the high bits of the destination register, meaning that
even
> though _we_ don't care, the processor must treat the destination as an
> additional input where it might otherwise not be (especially for MOV, less so
> for this arithmetic). That constrains register renaming which makes operations
> less fast than they might otherwise be. The 32-bit ops do not have this
problem
> because they are defined to clear the top 32 bits of the destination register
> always.
Done.
one possible typo http://codereview.appspot.com/6442114/diff/21002/src/cmd/8g/peep.c File src/cmd/8g/peep.c (right): http://codereview.appspot.com/6442114/diff/21002/src/cmd/8g/peep.c#newcode310 src/cmd/8g/peep.c:310: // can smash the entire 64-bit ...
12 years, 10 months ago
(2012-09-02 19:25:24 UTC)
#10
Issue 6442114: code review 6442114: cmd/6g, cmd/8g: eliminate short integer arithmetic when...
(Closed)
Created 12 years, 11 months ago by remyoudompheng
Modified 12 years, 10 months ago
Reviewers: minux1
Base URL:
Comments: 14