Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2678)

Issue 6501110: code review 6501110: cmd/6g, cmd/8g: do not LEA[LQ] interfaces when calling ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by remyoudompheng
Modified:
11 years, 7 months ago
Reviewers:
CC:
DMorsing, rsc, golang-dev, remy_archlinux.org
Visibility:
Public.

Description

cmd/6g, cmd/8g: do not LEA[LQ] interfaces when calling methods. It is enough to load directly the data word and the itab word from memory, so we save a LEA instruction for each method call, and allow elimination of some extra temporaries. Update issue 1914.

Patch Set 1 #

Patch Set 2 : diff -r 0a0666f2fe86 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 0a0666f2fe86 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 4 : diff -r 09fe2c10489d https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 09fe2c10489d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -28 lines) Patch
M src/cmd/6g/ggen.c View 1 2 3 4 chunks +18 lines, -16 lines 0 comments Download
M src/cmd/8g/ggen.c View 1 2 3 2 chunks +14 lines, -12 lines 0 comments Download

Messages

Total messages: 7
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 7 months ago (2012-09-09 06:52:49 UTC) #1
DMorsing
Could you post a section of assembly code before and after this change?
11 years, 7 months ago (2012-09-09 06:58:00 UTC) #2
remyoudompheng
Here is an example where the change leads to elimination of a temporary: io.WriteString See ...
11 years, 7 months ago (2012-09-09 07:15:42 UTC) #3
rsc
LGTM http://codereview.appspot.com/6501110/diff/3/src/cmd/6g/ggen.c File src/cmd/6g/ggen.c (right): http://codereview.appspot.com/6501110/diff/3/src/cmd/6g/ggen.c#newcode130 src/cmd/6g/ggen.c:130: igen(i, &nodr, res); // REG = &inter Can ...
11 years, 7 months ago (2012-09-11 02:25:57 UTC) #4
remyoudompheng
Hello daniel.morsing@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com, remy@archlinux.org), Please take another look.
11 years, 7 months ago (2012-09-11 06:42:20 UTC) #5
remyoudompheng
Submitting. http://codereview.appspot.com/6501110/diff/3/src/cmd/6g/ggen.c File src/cmd/6g/ggen.c (right): http://codereview.appspot.com/6501110/diff/3/src/cmd/6g/ggen.c#newcode130 src/cmd/6g/ggen.c:130: igen(i, &nodr, res); // REG = &inter On ...
11 years, 7 months ago (2012-09-11 06:45:06 UTC) #6
remyoudompheng
11 years, 7 months ago (2012-09-11 06:45:28 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=54654f95a754 ***

cmd/6g, cmd/8g: do not LEA[LQ] interfaces when calling methods.

It is enough to load directly the data word and the itab word
from memory, so we save a LEA instruction for each method call,
and allow elimination of some extra temporaries.

Update issue 1914.

R=daniel.morsing, rsc
CC=golang-dev, remy
http://codereview.appspot.com/6501110
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b