Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for Deadcode (0.17 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/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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/link/internal/ld/heap.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package ld
    
    import "cmd/link/internal/loader"
    
    // Min-heap implementation, for the deadcode pass.
    // Specialized for loader.Sym elements.
    
    type heap []loader.Sym
    
    func (h *heap) push(s loader.Sym) {
    	*h = append(*h, s)
    	// sift up
    	n := len(*h) - 1
    	for n > 0 {
    		p := (n - 1) / 2 // parent
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:55:22 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/copyelim.go

    // license that can be found in the LICENSE file.
    
    package ssa
    
    // combine copyelim and phielim into a single pass.
    // copyelim removes all uses of OpCopy values from f.
    // A subsequent deadcode pass is needed to actually remove the copies.
    func copyelim(f *Func) {
    	phielim(f)
    
    	// loop of copyelimValue(v) process has been done in phielim() pass.
    	// Update block control values.
    	for _, b := range f.Blocks {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/fuse.go

    	// the following optimization will do this.
    	b.removeEdge(0)
    	if s0 != b && len(s0.Preds) == 0 {
    		s0.removeEdge(0)
    		// Move any (dead) values in s0 to b,
    		// where they will be eliminated by the next deadcode pass.
    		for _, v := range s0.Values {
    			v.Block = b
    		}
    		b.Values = append(b.Values, s0.Values...)
    		// Clear s0.
    		s0.Kind = BlockInvalid
    		s0.Values = nil
    		s0.Succs = nil
    		s0.Preds = nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 9K bytes
    - Viewed (0)
Back to top