]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/compile/internal/inline/inlheur/score_callresult_uses.go
cmd/compile/internal/inline/inlheur: remove pkg-level call site table
[gostls13.git] / src / cmd / compile / internal / inline / inlheur / score_callresult_uses.go
index d13e1c3286f62eeb852c155cdf5384835e789105..6a306d452212fd756e9f68177f44051baa2ea80b 100644 (file)
@@ -150,17 +150,17 @@ func namesDefined(cs *CallSite) ([]*ir.Name, []*ir.Name, *FuncProps) {
        if cs.Assign == nil {
                return nil, nil, nil
        }
-       fih, ok := fpmap[cs.Callee]
+       funcInlHeur, ok := fpmap[cs.Callee]
        if !ok {
                // TODO: add an assert/panic here.
                return nil, nil, nil
        }
-       if len(fih.props.ResultFlags) == 0 {
+       if len(funcInlHeur.props.ResultFlags) == 0 {
                return nil, nil, nil
        }
 
        // Single return case.
-       if len(fih.props.ResultFlags) == 1 {
+       if len(funcInlHeur.props.ResultFlags) == 1 {
                asgn, ok := cs.Assign.(*ir.AssignStmt)
                if !ok {
                        return nil, nil, nil
@@ -170,7 +170,7 @@ func namesDefined(cs *CallSite) ([]*ir.Name, []*ir.Name, *FuncProps) {
                if !ok {
                        return nil, nil, nil
                }
-               return []*ir.Name{aname}, []*ir.Name{nil}, fih.props
+               return []*ir.Name{aname}, []*ir.Name{nil}, funcInlHeur.props
        }
 
        // Multi-return case
@@ -178,8 +178,8 @@ func namesDefined(cs *CallSite) ([]*ir.Name, []*ir.Name, *FuncProps) {
        if !ok || !asgn.Def {
                return nil, nil, nil
        }
-       userVars := make([]*ir.Name, len(fih.props.ResultFlags))
-       autoTemps := make([]*ir.Name, len(fih.props.ResultFlags))
+       userVars := make([]*ir.Name, len(funcInlHeur.props.ResultFlags))
+       autoTemps := make([]*ir.Name, len(funcInlHeur.props.ResultFlags))
        for idx, x := range asgn.Lhs {
                if n, ok := x.(*ir.Name); ok {
                        userVars[idx] = n
@@ -198,7 +198,7 @@ func namesDefined(cs *CallSite) ([]*ir.Name, []*ir.Name, *FuncProps) {
                        return nil, nil, nil
                }
        }
-       return userVars, autoTemps, fih.props
+       return userVars, autoTemps, funcInlHeur.props
 }
 
 func (rua *resultUseAnalyzer) nodeVisitPost(n ir.Node) {