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

Issue 94810044: code review 94810044: cmd/gc: don't give credit for NOPs during register allo... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by josharian
Modified:
11 years ago
Reviewers:
gobot, rsc
CC:
rsc, golang-codereviews
Visibility:
Public.

Description

cmd/gc: don't give credit for NOPs during register allocation The register allocator decides which variables should be placed into registers by charging for each load/store and crediting for each use, and then selecting an allocation with minimal cost. NOPs will be eliminated, however, so using a variable in a NOP should not generate credit. Issue 7867 arises from attempted registerization of multi-word variables because they are used in NOPs. By not crediting for that use, they will no longer be considered for registerization. This fix could theoretically lead to better register allocation, but NOPs are rare relative to other instructions. Fixes issue 7867.

Patch Set 1 #

Patch Set 2 : diff -r eba73fe6f55e https://code.google.com/p/go #

Patch Set 3 : diff -r eba73fe6f55e https://code.google.com/p/go #

Patch Set 4 : diff -r 8f49b5cc8196 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -29 lines) Patch
M src/cmd/5g/reg.c View 1 2 3 1 chunk +13 lines, -11 lines 0 comments Download
M src/cmd/6g/reg.c View 1 1 chunk +5 lines, -6 lines 0 comments Download
M src/cmd/8g/reg.c View 1 1 chunk +13 lines, -12 lines 0 comments Download
A test/fixedbugs/issue7867.go View 1 1 chunk +43 lines, -0 lines 0 comments Download

Messages

Total messages: 9
josharian
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
11 years ago (2014-04-28 17:36:01 UTC) #1
josharian
Third time's a charm, I hope. I feel much more confident about the safety of ...
11 years ago (2014-04-28 17:37:28 UTC) #2
rsc
Is this still relevant?
11 years ago (2014-05-02 15:55:33 UTC) #3
josharian
> Is this still relevant? I think so. The issue is unfixed, and I've not ...
11 years ago (2014-05-02 15:56:55 UTC) #4
josharian
PTAL No actual rush, just getting the dashboard to update.
11 years ago (2014-05-03 20:41:04 UTC) #5
rsc
LGTM
11 years ago (2014-05-09 16:06:04 UTC) #6
josharian
*** Submitted as https://code.google.com/p/go/source/detail?r=4ffd1c7fbadb *** cmd/gc: don't give credit for NOPs during register allocation The ...
11 years ago (2014-05-09 16:55:20 UTC) #7
gobot
This CL appears to have broken the netbsd-amd64-bsiegert builder. See http://build.golang.org/log/739f52ad3967dfd0b55cde67a8d4da7d2b2b9499
11 years ago (2014-05-09 17:29:23 UTC) #8
josharian
11 years ago (2014-05-09 17:35:55 UTC) #9
> This CL appears to have broken the netbsd-amd64-bsiegert builder.
> See http://build.golang.org/log/739f52ad3967dfd0b55cde67a8d4da7d2b2b9499

Nope. I'll reopen issue 7328.

--- FAIL: TestFinalizerType-4 (6.00 seconds)
mfinal_test.go:61: finalizer for type func(*int) didn't run
FAIL
Sign in to reply to this message.

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