Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ReplaceControl (0.17 sec)

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

    func (b *Block) AddControl(v *Value) {
    	i := b.NumControls()
    	b.Controls[i] = v // panics if array is full
    	v.Uses++
    }
    
    // ReplaceControl exchanges the existing control value at the index provided
    // for the new value. The index must refer to a valid control value.
    func (b *Block) ReplaceControl(i int, v *Value) {
    	b.Controls[i].Uses--
    	b.Controls[i] = v
    	v.Uses++
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/copyelim.go

    	phielim(f)
    
    	// loop of copyelimValue(v) process has been done in phielim() pass.
    	// Update block control values.
    	for _, b := range f.Blocks {
    		for i, v := range b.ControlValues() {
    			if v.Op == OpCopy {
    				b.ReplaceControl(i, v.Args[0])
    			}
    		}
    	}
    
    	// Update named values.
    	for _, name := range f.Names {
    		values := f.NamedValues[*name]
    		for i, v := range values {
    			if v.Op == OpCopy {
    				values[i] = v.Args[0]
    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/schedule.go

    				if a.Op == OpSPanchored || opcodeTable[a.Op].nilCheck {
    					v.SetArg(i, a.Args[0])
    				}
    			}
    		}
    		for i, c := range b.ControlValues() {
    			if c.Op == OpSPanchored || opcodeTable[c.Op].nilCheck {
    				b.ReplaceControl(i, c.Args[0])
    			}
    		}
    	}
    	for _, b := range f.Blocks {
    		i := 0
    		for _, v := range b.Values {
    			if v.Op == OpSPanchored {
    				// Free this value
    				if v.Uses != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 15:53:17 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/rewrite.go

    				b0 = new(Block)
    				*b0 = *b
    				b0.Succs = append([]Edge{}, b.Succs...) // make a new copy, not aliasing
    			}
    			for i, c := range b.ControlValues() {
    				for c.Op == OpCopy {
    					c = c.Args[0]
    					b.ReplaceControl(i, c)
    				}
    			}
    			if rb(b) {
    				change = true
    				if debug > 1 {
    					fmt.Printf("rewriting %s  ->  %s\n", b0.LongString(), b.LongString())
    				}
    			}
    			for j, v := range b.Values {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:02:52 UTC 2024
    - 64.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/regalloc.go

    			}
    			// We assume that a control input can be passed in any
    			// type-compatible register. If this turns out not to be true,
    			// we'll need to introduce a regspec for a block's control value.
    			b.ReplaceControl(i, s.allocValToReg(v, s.compatRegs(v.Type), false, b.Pos))
    		}
    
    		// Reduce the uses of the control values once registers have been loaded.
    		// This loop is equivalent to the advanceUses method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:49:56 UTC 2023
    - 87.2K bytes
    - Viewed (0)
Back to top