Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for Deadcode (0.68 sec)

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

    			}
    		}
    	}
    
    	return
    }
    
    // deadcode removes dead code from f.
    func deadcode(f *Func) {
    	// deadcode after regalloc is forbidden for now. Regalloc
    	// doesn't quite generate legal SSA which will lead to some
    	// required moves being eliminated. See the comment at the
    	// top of regalloc.go for details.
    	if f.RegAlloc != nil {
    		f.Fatalf("deadcode after regalloc")
    	}
    
    	// Find reachable blocks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/deadcode.go

    		if exportsIdx != 0 {
    			relocs := d.ldr.Relocs(exportsIdx)
    			for i := 0; i < relocs.Count(); i++ {
    				d.mark(relocs.At(i).Sym(), 0)
    			}
    		}
    	}
    
    	if d.ctxt.Debugvlog > 1 {
    		d.ctxt.Logf("deadcode start names: %v\n", names)
    	}
    
    	for _, name := range names {
    		// Mark symbol as a data/ABI0 symbol.
    		d.mark(d.ldr.Lookup(name, 0), 0)
    		if abiInternalVer != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/compile.go

    	{name: "late lower", fn: lateLower, required: true},
    	{name: "lowered deadcode for cse", fn: deadcode}, // deadcode immediately before CSE avoids CSE making dead values live again
    	{name: "lowered cse", fn: cse},
    	{name: "elim unread autos", fn: elimUnreadAutos},
    	{name: "tighten tuple selectors", fn: tightenTupleSelectors, required: true},
    	{name: "lowered deadcode", fn: deadcode, required: true},
    	{name: "checkLower", fn: checkLower, required: true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/testdata/deadcode/globalmap.go

    package main
    
    import "os"
    
    // Too small to trigger deadcode (currently)
    var small = map[string]int{"foo": 1}
    
    // Has side effects, which prevent deadcode
    var effect = map[string]int{"foo": os.Getpid()}
    
    // Large and side-effect free
    var large = map[string]int{
    	"11": 1, "12": 2, "13": 3, "14": 4, "15": 5, "16": 6, "17": 7, "18": 8, "19": 9, "110": 10,
    	"21": 1, "22": 2, "23": 3, "24": 4, "25": 5, "26": 6, "27": 7, "28": 8, "29": 9, "210": 10,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 20:56:47 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/nilcheck_test.go

    		Bloc("extra",
    			Goto("exit")),
    		Bloc("exit",
    			Exit("mem")))
    
    	CheckFunc(fun.f)
    	nilcheckelim(fun.f)
    
    	// clean up the removed nil check
    	fuse(fun.f, fuseTypePlain)
    	deadcode(fun.f)
    
    	CheckFunc(fun.f)
    	for _, b := range fun.f.Blocks {
    		if b == fun.blocks["secondCheck"] && isNilCheck(b) {
    			t.Errorf("secondCheck was not eliminated")
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 12.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/passbm_test.go

    func BenchmarkCSEPassBlock(b *testing.B)      { benchFnBlock(b, cse, genFunction) }
    func BenchmarkDeadcodePass(b *testing.B)      { benchFnPass(b, deadcode, blockCount, genFunction) }
    func BenchmarkDeadcodePassBlock(b *testing.B) { benchFnBlock(b, deadcode, genFunction) }
    
    func multi(f *Func) {
    	cse(f)
    	dse(f)
    	deadcode(f)
    }
    func BenchmarkMultiPass(b *testing.B)      { benchFnPass(b, multi, blockCount, genFunction) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/export_test.go

    	"cmd/internal/obj"
    	"cmd/internal/obj/arm64"
    	"cmd/internal/obj/s390x"
    	"cmd/internal/obj/x86"
    	"cmd/internal/src"
    	"cmd/internal/sys"
    )
    
    var CheckFunc = checkFunc
    var Opt = opt
    var Deadcode = deadcode
    var Copyelim = copyelim
    
    var testCtxts = map[string]*obj.Link{
    	"amd64": obj.Linknew(&x86.Linkamd64),
    	"s390x": obj.Linknew(&s390x.Links390x),
    	"arm64": obj.Linknew(&arm64.Linkarm64),
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 21:19:39 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/cse_test.go

    			Valu("rstore", OpStore, types.TypeMem, 0, c.config.Types.Int64, "raddr", "r10", "raddrdef"),
    			Goto("exit")),
    		Bloc("exit",
    			Exit("rstore")))
    
    	CheckFunc(fun.f)
    	cse(fun.f)
    	deadcode(fun.f)
    	CheckFunc(fun.f)
    
    	s1Cnt := 2
    	// r1 == r2 == r3, needs to remove two of this set
    	s2Cnt := 1
    	// r4 == r5, needs to remove one of these
    	for k, v := range fun.values {
    		if v.Op == OpInvalid {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/tests/lower_globals_to_ml_program_invalid.mlir

    }
    
    // -----
    
    module attributes {tf_saved_model.semantics} {
      // expected-error@+1 {{no predecessor}}
      func.func @f() -> () attributes {tf_saved_model.exported_names = ["f"]} {
      ^entry():
        return
      ^deadcode(%0: tensor<!tf_type.resource<tensor<?xf32>>>):
        %ret = "tf.ReadVariableOp"(%0) : (tensor<!tf_type.resource<tensor<?xf32>>>) -> tensor<?xf32>
        return
      }
    }
    
    // -----
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Aug 24 21:57:26 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/deadcode_test.go

    			[]string{"main.large"}},
    	}
    	for _, test := range tests {
    		test := test
    		t.Run(test.src, func(t *testing.T) {
    			t.Parallel()
    			src := filepath.Join("testdata", "deadcode", test.src+".go")
    			exe := filepath.Join(tmpdir, test.src+".exe")
    			cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-ldflags=-dumpdep", "-o", exe, src)
    			out, err := cmd.CombinedOutput()
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:07:26 UTC 2023
    - 1.7K bytes
    - Viewed (0)
Back to top