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

Issue 5646044: code review 5646044: 6g,8g: make constant propagation inlining-friendly.

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by jgennis
Modified:
13 years, 3 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

6g,8g: make constant propagation inlining-friendly. This changes makes constant propagation compare 'from' values using node pointers rather than symbol names when checking to see whether a set operation is redundant. When a function is inlined multiple times in a calling function its arguments will share symbol names even though the values are different. Prior to this fix the bug409 test would hit a case with 6g where an LEAQ instruction was incorrectly eliminated from the second inlined function call. 8g appears to have had the same bug, but the test did not fail there.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
M src/cmd/6g/peep.c View 1 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/8g/peep.c View 1 1 chunk +1 line, -1 line 0 comments Download
A test/fixedbugs/bug409.go View 1 1 chunk +20 lines, -0 lines 0 comments Download
A test/fixedbugs/bug409.out View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3
jgennis
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2012-02-08 07:28:47 UTC) #1
rsc
LGTM Thanks very much for finding this! I grepped through the rest of the optimizer ...
13 years, 3 months ago (2012-02-08 13:40:22 UTC) #2
rsc
13 years, 3 months ago (2012-02-08 15:25:18 UTC) #3
*** Submitted as c46561b27b39 ***

6g,8g: make constant propagation inlining-friendly.

This changes makes constant propagation compare 'from' values using node
pointers rather than symbol names when checking to see whether a set
operation is redundant. When a function is inlined multiple times in a
calling function its arguments will share symbol names even though the values
are different. Prior to this fix the bug409 test would hit a case with 6g
where an LEAQ instruction was incorrectly eliminated from the second inlined
function call. 8g appears to have had the same bug, but the test did not fail
there.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/5646044

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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