Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 464 for nilcheck (0.14 sec)

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

    							v.Pos = v.Pos.WithNotStmt()
    						}
    						// This is a redundant explicit nil check.
    						v.reset(OpConstBool)
    						v.AuxInt = 1 // true
    					}
    				case OpNilCheck:
    					ptr := v.Args[0]
    					if nilCheck := nonNilValues[ptr.ID]; nilCheck != nil {
    						// This is a redundant implicit nil check.
    						// Logging in the style of the former compiler -- and omit line 1,
    						// which is usually in generated code.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/schedule.go

    // otherwise v is ordered before s.
    // Specifically, values are ordered like
    //
    //	store1
    //	NilCheck that depends on store1
    //	other values that depends on store1
    //	store2
    //	NilCheck that depends on store2
    //	other values that depends on store2
    //	...
    //
    // The order of non-store and non-NilCheck values are undefined
    // (not necessarily dependency order). This should be cheaper
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 15:53:17 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/nilcheck_test.go

    		if b == fun.blocks["secondCheck"] && isNilCheck(b) {
    			t.Errorf("secondCheck was not eliminated")
    		}
    		if b == fun.blocks["differentCheck"] && isNilCheck(b) {
    			foundDifferentCheck = true
    		}
    	}
    	if !foundDifferentCheck {
    		t.Errorf("removed differentCheck, but shouldn't have")
    	}
    }
    
    // TestNilcheckInFalseBranch tests that nil checks in the false branch of a nilcheck
    // block are *not* removed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/check.go

    				}
    			case OpNilCheck:
    				// nil checks have pointer type before scheduling, and
    				// void type after scheduling.
    				if f.scheduled {
    					if v.Uses != 0 {
    						f.Fatalf("nilcheck must have 0 uses %s", v.Uses)
    					}
    					if !v.Type.IsVoid() {
    						f.Fatalf("nilcheck must have void type %s", v.Type.String())
    					}
    				} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/compile.go

    	// checkLower must run after lowering & subsequent dead code elim
    	{"lower", "checkLower"},
    	{"lowered deadcode", "checkLower"},
    	{"late lower", "checkLower"},
    	// late nilcheck needs instructions to be scheduled.
    	{"schedule", "late nilcheck"},
    	// flagalloc needs instructions to be scheduled.
    	{"schedule", "flagalloc"},
    	// regalloc needs flags to be allocated first.
    	{"flagalloc", "regalloc"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  6. test/nilptr3.go

    	// and the offset is small enough that if x is nil, the address will still be
    	// in the first unmapped page of memory.
    
    	_ = x[9] // ERROR "generated nil check" // bug: would like to remove this check (but nilcheck and load are in different blocks)
    
    	for {
    		if x[9] != 0 { // ERROR "removed nil check"
    			break
    		}
    	}
    
    	x = fx10()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/fuse_test.go

    			Valu("mem", OpInitMem, types.TypeMem, 0, nil),
    			Valu("c1", OpArg, c.config.Types.Bool, 0, nil),
    			Valu("p", OpArg, c.config.Types.IntPtr, 0, nil),
    			If("c1", "z0", "exit")),
    		Bloc("z0",
    			Valu("nilcheck", OpNilCheck, c.config.Types.IntPtr, 0, nil, "p", "mem"),
    			Goto("exit")),
    		Bloc("exit",
    			Exit("mem"),
    		))
    	CheckFunc(fun.f)
    	fuseLate(fun.f)
    	z0, ok := fun.blocks["z0"]
    	if !ok || z0.Kind == BlockInvalid {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/numberlines.go

    // license that can be found in the LICENSE file.
    
    package ssa
    
    import (
    	"cmd/internal/src"
    	"fmt"
    	"sort"
    )
    
    func isPoorStatementOp(op Op) bool {
    	switch op {
    	// Note that Nilcheck often vanishes, but when it doesn't, you'd love to start the statement there
    	// so that a debugger-user sees the stop before the panic, and can examine the value.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 14 21:26:13 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/fuse.go

    // There may be false positives.
    func isEmpty(b *Block) bool {
    	for _, v := range b.Values {
    		if v.Uses > 0 || v.Op.IsCall() || v.Op.HasSideEffects() || v.Type.IsVoid() || opcodeTable[v.Op].nilCheck {
    			return false
    		}
    	}
    	return true
    }
    
    // fuseBlockPlain handles a run of blocks with length >= 2,
    // whose interior has single predecessors and successors,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/deadcode.go

    					liveOrderStmts = append(liveOrderStmts, v)
    				}
    			}
    		}
    		for _, v := range b.Values {
    			if (opcodeTable[v.Op].call || opcodeTable[v.Op].hasSideEffects || opcodeTable[v.Op].nilCheck) && !live[v.ID] {
    				live[v.ID] = true
    				q = append(q, v)
    				if v.Pos.IsStmt() != src.PosNotStmt {
    					liveOrderStmts = append(liveOrderStmts, v)
    				}
    			}
    			if v.Op == OpInlMark {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
Back to top