diff options
author | Austin Clements <austin@google.com> | 2014-11-05 15:14:47 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2014-11-05 15:14:47 -0500 |
commit | 9d825d7306e349e99c31acfb02ae06925040fa5b (patch) | |
tree | bb6b9bfa2cd76151f560336bc91874744dd64aa0 /src/cmd/5g | |
parent | a2b2ebdbfcf213a434642cdc27ed0bab244207ac (diff) | |
download | go-9d825d7306e349e99c31acfb02ae06925040fa5b.tar.gz |
5g: don't generate reg variables for direct-called functions
The test intended to skip direct calls when creating
registerization variables was testing p->to.type instead of
p->to.name, so it always failed, causing regopt to create
unnecessary variables for these names.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/169110043
Diffstat (limited to 'src/cmd/5g')
-rw-r--r-- | src/cmd/5g/reg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/5g/reg.c b/src/cmd/5g/reg.c index 8e49a2d9c..27d9d3e8b 100644 --- a/src/cmd/5g/reg.c +++ b/src/cmd/5g/reg.c @@ -199,7 +199,7 @@ regopt(Prog *firstp) proginfo(&info, p); // Avoid making variables for direct-called functions. - if(p->as == ABL && p->to.type == D_EXTERN) + if(p->as == ABL && p->to.name == D_EXTERN) continue; bit = mkvar(r, &p->from); |