Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for SetArg (0.24 sec)

  1. src/cmd/compile/internal/ssa/memcombine.go

    		}
    
    		// Move all the stores to the root.
    		for i := int64(0); i < n; i++ {
    			v := a[i].store
    			if v == root {
    				v.Aux = cv.Type // widen store type
    				v.Pos = pos
    				v.SetArg(0, ptr)
    				v.SetArg(1, cv)
    				v.SetArg(2, mem)
    			} else {
    				clobber(v)
    				v.Type = types.Types[types.TBOOL] // erase memory type
    			}
    		}
    		return true
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 19:45:41 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/copyelim.go

    	// sure that we don't end up doing O(n^2) work
    	// for a chain of n copies.
    	for v != w {
    		x := v.Args[0]
    		v.SetArg(0, w)
    		v = x
    	}
    	return w
    }
    
    // copyelimValue ensures that no args of v are copies.
    func copyelimValue(v *Value) {
    	for i, a := range v.Args {
    		if a.Op == OpCopy {
    			v.SetArg(i, copySource(a))
    		}
    	}
    }
    
    // phielim eliminates redundant phi values from f.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/flagalloc.go

    			for i, a := range v.Args {
    				if !a.Type.IsFlags() {
    					continue
    				}
    				if a == flag {
    					continue
    				}
    				// Recalculate a
    				c := copyFlags(a, b)
    				// Update v.
    				v.SetArg(i, c)
    				// Remember the most-recently computed flag value.
    				flag = a
    			}
    			// Issue v.
    			b.Values = append(b.Values, v)
    			if v.clobbersFlags() {
    				flag = nil
    			}
    			if v.Type.IsFlags() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/shortcircuit.go

    				if p.Controls[0] != a {
    					continue
    				}
    				if e.i == 0 {
    					if ct == nil {
    						ct = f.ConstBool(f.Config.Types.Bool, true)
    					}
    					v.SetArg(i, ct)
    				} else {
    					if cf == nil {
    						cf = f.ConstBool(f.Config.Types.Bool, false)
    					}
    					v.SetArg(i, cf)
    				}
    			}
    		}
    	}
    
    	// Step 2: Redirect control flow around known branches.
    	// p:
    	//   ... goto b ...
    	// b: <- p ...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 03 17:47:02 UTC 2022
    - 12.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/zcse.go

    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    			for i, a := range v.Args {
    				if opcodeTable[a.Op].argLen == 0 {
    					key := vkey{a.Op, keyFor(a), a.Aux, a.Type}
    					if rv, ok := vals[key]; ok {
    						v.SetArg(i, rv)
    					}
    				}
    			}
    		}
    	}
    }
    
    // vkey is a type used to uniquely identify a zero arg value.
    type vkey struct {
    	op Op
    	ai int64       // aux int
    	ax Aux         // aux
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 08 01:46:31 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/trim.go

    		}
    		// If the original block contained u = φ(u0, u1, ..., un) and
    		// the current phi is
    		//    v = φ(v0, v1, ..., u, ..., vk)
    		// then the merged phi is
    		//    v = φ(v0, v1, ..., u0, ..., vk, u1, ..., un)
    		v.SetArg(i, u.Args[0])
    		v.AddArgs(u.Args[1:]...)
    	} else {
    		// If the original block contained u = φ(u0, u1, ..., un) and
    		// the current phi is
    		//    v = φ(v0, v1, ...,  vi, ..., vk)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/tighten.go

    					continue // not a constant we can move around
    				}
    				if a.Block == b.Preds[i].b {
    					continue // already in the right place
    				}
    				// Make a copy of a, put in predecessor block.
    				v.SetArg(i, a.copyInto(b.Preds[i].b))
    			}
    		}
    	}
    }
    
    // memState computes the memory state at the beginning and end of each block of
    // the function. The memory state is represented by a value of mem type.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 01:01:38 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/loopreschedchecks.go

    		for b, r := range newmemphis {
    			fmt.Printf("after b=%s, rewrite=%s\n", b, r.String())
    		}
    	}
    
    	// Apply collected rewrites.
    	for _, r := range newmemphis {
    		for _, rw := range r.rewrites {
    			rw.v.SetArg(rw.i, r.after)
    		}
    	}
    
    	// Rewrite backedges to include reschedule checks.
    	for _, emc := range tofixBackedges {
    		e := emc.e
    		headerMemPhi := emc.m
    		h := e.b
    		i := e.i
    		p := h.Preds[i]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 21:17:10 UTC 2023
    - 16K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/cse.go

    						if w.Block == v.Block && w.Pos.Line() == v.Pos.Line() {
    							v.Pos = v.Pos.WithIsStmt()
    							w.Pos = w.Pos.WithNotStmt()
    						} // TODO and if this fails?
    					}
    					v.SetArg(i, x)
    					rewrites++
    				}
    			}
    		}
    		for i, v := range b.ControlValues() {
    			if x := rewrite[v.ID]; x != nil {
    				if v.Op == OpNilCheck {
    					// nilcheck pass will remove the nil checks and log
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/prove.go

    		for i, v := range check.Args {
    			if v != end {
    				continue
    			}
    
    			check.SetArg(i, start)
    			goto replacedEnd
    		}
    		panic(fmt.Sprintf("unreachable, ind: %v, start: %v, end: %v", ind, start, end))
    	replacedEnd:
    
    		for i, v := range ind.Args {
    			if v != start {
    				continue
    			}
    
    			ind.SetArg(i, end)
    			goto replacedStart
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:30:21 UTC 2024
    - 48.9K bytes
    - Viewed (0)
Back to top