Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for ReplaceControl (0.19 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/flagalloc.go

    				flag = v
    			}
    		}
    		for i, v := range b.ControlValues() {
    			if v != flag && v.Type.IsFlags() {
    				// Recalculate control value.
    				remove = append(remove, v)
    				c := copyFlags(v, b)
    				b.ReplaceControl(i, c)
    				flag = v
    			}
    		}
    		if v := end[b.ID]; v != nil && v != flag {
    			// Need to reissue flag generator for use by
    			// subsequent blocks.
    			remove = append(remove, v)
    			copyFlags(v, b)
    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/cse.go

    			if x := rewrite[v.ID]; x != nil {
    				if v.Op == OpNilCheck {
    					// nilcheck pass will remove the nil checks and log
    					// them appropriately, so don't mess with them here.
    					continue
    				}
    				b.ReplaceControl(i, x)
    			}
    		}
    	}
    
    	if f.pass.stats > 0 {
    		f.LogStat("CSE REWRITES", rewrites)
    	}
    }
    
    // An eqclass approximates an equivalence class. During the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/shortcircuit.go

    	for _, v := range b.Values {
    		for i, a := range v.Args {
    			if a == old {
    				v.SetArg(i, new)
    			}
    		}
    	}
    	for i, v := range b.ControlValues() {
    		if v == old {
    			b.ReplaceControl(i, new)
    		}
    	}
    }
    
    // moveTo moves v to dst, adjusting the appropriate Block.Values slices.
    // The caller is responsible for ensuring that this is safe.
    // i is the index of v in v.Block.Values.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 03 17:47:02 UTC 2022
    - 12.6K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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