mirror of
https://github.com/golang/go
synced 2024-11-19 10:14:44 -07:00
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://golang.org/cl/169110043
This commit is contained in:
parent
c6e53fea10
commit
bb4a358af3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user