Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for phi2 (0.08 sec)

  1. src/cmd/compile/internal/ssagen/phi.go

    			// Record the new assignment.
    			values[n] = v
    		}
    
    		// Replace phi args in successors with the current incoming value.
    		for _, e := range b.Succs {
    			c, i := e.Block(), e.Index()
    			for j := len(c.Values) - 1; j >= 0; j-- {
    				v := c.Values[j]
    				if v.Op != ssa.OpPhi {
    					break // All phis will be at the end of the block during phi building.
    				}
    				// Only set arguments that have been resolved.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 15.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/loopreschedchecks.go

    	}
    }
    
    // newPhiFor inserts a new Phi function into b,
    // with all inputs set to v.
    func newPhiFor(b *Block, v *Value) *Value {
    	phiV := b.NewValue0(b.Pos, OpPhi, v.Type)
    
    	for range b.Preds {
    		phiV.AddArg(v)
    	}
    	return phiV
    }
    
    // rewriteNewPhis updates newphis[h] to record all places where the new phi function inserted
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 21:17:10 UTC 2023
    - 16K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/shortcircuit.go

    	if nOtherPhi != 0 {
    		// Adjust all other phis as necessary.
    		// Use a plain for loop instead of range because fixPhi may move phis,
    		// thus modifying b.Values.
    		for i := 0; i < len(b.Values); i++ {
    			phi := b.Values[i]
    			if phi.Uses == 0 || phi == ctl || phi.Op != OpPhi {
    				continue
    			}
    			fixPhi(phi, i)
    			if phi.Block == b {
    				continue
    			}
    			// phi got moved to a different block with v.moveTo.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 03 17:47:02 UTC 2022
    - 12.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/decompose.go

    		}
    	}
    	v.reset(StructMakeOp(n))
    	v.AddArgs(fields[:n]...)
    
    	// Recursively decompose phis for each field.
    	for _, f := range fields[:n] {
    		decomposeUserPhi(f)
    	}
    }
    
    // decomposeArrayPhi replaces phi-of-array with arraymake(phi-of-array-element),
    // and then recursively decomposes the element phi.
    func decomposeArrayPhi(v *Value) {
    	t := v.Type
    	if t.NumElem() == 0 {
    		v.reset(OpArrayMake0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 21:22:15 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/stackalloc.go

    			phis = phis[:0]
    			for i := len(b.Values) - 1; i >= 0; i-- {
    				v := b.Values[i]
    				live.remove(v.ID)
    				if v.Op == OpPhi {
    					// Save phi for later.
    					// Note: its args might need a stack slot even though
    					// the phi itself doesn't. So don't use needSlot.
    					if !v.Type.IsMemory() && !v.Type.IsVoid() {
    						phis = append(phis, v)
    					}
    					continue
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 21:29:41 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/branchelim.go

    	case "amd64":
    		const maxcost = 2
    		phi := 0
    		other := 0
    		for _, v := range post.Values {
    			if v.Op == OpPhi {
    				// Each phi results in CondSelect, which lowers into CMOV,
    				// CMOV has latency >1 on most CPUs.
    				phi++
    			}
    			for _, x := range v.Args {
    				if x.Block == no || x.Block == yes {
    					other++
    				}
    			}
    		}
    		cost := phi * 1
    		if phi > 1 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 30 17:46:51 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/deadstore.go

    		for k := range localAddrs {
    			delete(localAddrs, k)
    		}
    		stores = stores[:0]
    		for _, v := range b.Values {
    			if v.Op == OpPhi {
    				// Ignore phis - they will always be first and can't be eliminated
    				continue
    			}
    			if v.Type.IsMemory() {
    				stores = append(stores, v)
    				for _, a := range v.Args {
    					if a.Block == b && a.Type.IsMemory() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 20:07:26 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/check.go

    					// If no mem phi, take mem of any predecessor.
    					mem = lastmem[b.Preds[0].b.ID]
    				}
    				for _, a := range v.Args {
    					if a.Type.IsMemory() && a != mem {
    						f.Fatalf("two live mems @ %s: %s and %s", v, mem, a)
    					}
    				}
    				if v.Type.IsMemory() {
    					mem = v
    				}
    			}
    		}
    	}
    
    	// Check that after scheduling, phis are always first in the block.
    	if f.scheduled {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/nilcheck_test.go

    		Bloc("b2",
    			Valu("ptr2", OpAddr, ptrType, 0, nil, "sb"),
    			Goto("checkPtr")),
    		// both ptr1 and ptr2 are guaranteed non-nil here
    		Bloc("checkPtr",
    			Valu("phi", OpPhi, ptrType, 0, nil, "ptr1", "ptr2"),
    			Valu("bool2", OpIsNonNil, c.config.Types.Bool, 0, nil, "phi"),
    			If("bool2", "extra", "exit")),
    		Bloc("extra",
    			Goto("exit")),
    		Bloc("exit",
    			Exit("mem")))
    
    	CheckFunc(fun.f)
    	nilcheckelim(fun.f)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/block.go

    		b.Fatalf("inconsistent state for %v, num predecessors: %d, num phi args: %d", phi, n, numPhiArgs)
    	}
    	phi.Args[i].Uses--
    	phi.Args[i] = phi.Args[n]
    	phi.Args[n] = nil
    	phi.Args = phi.Args[:n]
    	phielimValue(phi)
    }
    
    // LackingPos indicates whether b is a block whose position should be inherited
    // from its successors.  This is true if all the values within it have unreliable positions
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top