Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 45 for OpPhi (0.11 sec)

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

    				change = phielimValue(v) || change
    			}
    		}
    		if !change {
    			break
    		}
    	}
    }
    
    // phielimValue tries to convert the phi v to a copy.
    func phielimValue(v *Value) bool {
    	if v.Op != OpPhi {
    		return false
    	}
    
    	// If there are two distinct args of v which
    	// are not v itself, then the phi must remain.
    	// Otherwise, we can replace it with a copy.
    	var w *Value
    	for _, x := range v.Args {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/sccp_test.go

    		Bloc("b2",
    			Valu("v3", OpConst64, c.config.Types.Int64, 3, nil),
    			Goto("b4")),
    		Bloc("b3",
    			Valu("v4", OpConst64, c.config.Types.Int64, 4, nil),
    			Goto("b4")),
    		Bloc("b4",
    			Valu("merge", OpPhi, c.config.Types.Int64, 0, nil, "v3", "v4"),
    			Exit("mem")))
    	sccp(fun.f)
    	CheckFunc(fun.f)
    	for _, b := range fun.blocks {
    		for _, v := range b.Values {
    			if v == fun.values["merge"] {
    				if !isConst(v) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 21:01:50 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/deadcode.go

    	}
    
    	// Compute transitive closure of live values.
    	for len(q) > 0 {
    		// pop a reachable value
    		v := q[len(q)-1]
    		q[len(q)-1] = nil
    		q = q[:len(q)-1]
    		for i, x := range v.Args {
    			if v.Op == OpPhi && !reachable[v.Block.Preds[i].b.ID] {
    				continue
    			}
    			if !live[x.ID] {
    				live[x.ID] = true
    				q = append(q, x) // push
    				if x.Pos.IsStmt() != src.PosNotStmt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/print.go

    				printed[v.ID] = true
    			}
    			p.endBlock(b, reachable[b.ID])
    			continue
    		}
    
    		// print phis first since all value cycles contain a phi
    		n := 0
    		for _, v := range b.Values {
    			if v.Op != OpPhi {
    				continue
    			}
    			p.value(v, live[v.ID])
    			printed[v.ID] = true
    			n++
    		}
    
    		// print rest of values in dependency order
    		for n < len(b.Values) {
    			m := n
    		outer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/cse.go

    	// equivalent(v, w):
    	//   v.op == w.op
    	//   v.type == w.type
    	//   v.aux == w.aux
    	//   v.auxint == w.auxint
    	//   len(v.args) == len(w.args)
    	//   v.block == w.block if v.op == OpPhi
    	//   equivalent(v.args[i], w.args[i]) for i in 0..len(v.args)-1
    
    	// The algorithm searches for a partition of f's values into
    	// equivalence classes using the above definition.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/nilcheck_test.go

    			Goto("checkPtr")),
    		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")))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/prove.go

    				ft.update(b, v, v.Args[1], unsigned, lt)
    			case OpPhi:
    				// Determine the min and max value of OpPhi composed entirely of integer constants.
    				//
    				// For example, for an OpPhi:
    				//
    				// v1 = OpConst64 [13]
    				// v2 = OpConst64 [7]
    				// v3 = OpConst64 [42]
    				//
    				// v4 = OpPhi(v1, v2, v3)
    				//
    				// We can prove:
    				//
    				// v4 >= 7 && v4 <= 42
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:30:21 UTC 2024
    - 48.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/deadstore_test.go

    			Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil),
    			Valu("v", OpConstBool, c.config.Types.Bool, 1, nil),
    			Valu("addr", OpAddr, ptrType, 0, nil, "sb"),
    			Goto("loop")),
    		Bloc("loop",
    			Valu("phi", OpPhi, types.TypeMem, 0, nil, "start", "store"),
    			Valu("store", OpStore, types.TypeMem, 0, c.config.Types.Bool, "addr", "v", "phi"),
    			If("v", "loop", "exit")),
    		Bloc("exit",
    			Exit("store")))
    
    	CheckFunc(fun.f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 25 20:07:26 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/flagalloc.go

    			for _, e := range b.Preds[1:] {
    				p := e.b
    				if end[p.ID] != flag {
    					f.Fatalf("live flag in %s's predecessors not consistent", b)
    				}
    			}
    		}
    		for _, v := range oldSched {
    			if v.Op == OpPhi && v.Type.IsFlags() {
    				f.Fatalf("phi of flags not supported: %s", v.LongString())
    			}
    
    			// If v will be spilled, and v uses memory, then we must split it
    			// into a load + a flag generator.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/value.go

    // The returned value, if non-nil, will be memory-typed (or a tuple with a memory-typed second part).
    // Otherwise, nil is returned.
    func (v *Value) MemoryArg() *Value {
    	if v.Op == OpPhi {
    		v.Fatalf("MemoryArg on Phi")
    	}
    	na := len(v.Args)
    	if na == 0 {
    		return nil
    	}
    	if m := v.Args[na-1]; m.Type.IsMemory() {
    		return m
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:40:22 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top