Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for RegAlloc (0.12 sec)

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

    const (
    	likelyDistance   = 1
    	normalDistance   = 10
    	unlikelyDistance = 100
    )
    
    // regalloc performs register allocation on f. It sets f.RegAlloc
    // to the resulting allocation.
    func regalloc(f *Func) {
    	var s regAllocState
    	s.init(f)
    	s.regalloc(f)
    	s.close()
    }
    
    type register uint8
    
    const noRegister register = 255
    
    // For bulk initializing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:49:56 UTC 2023
    - 87.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/compile.go

    	{"schedule", "late nilcheck"},
    	// flagalloc needs instructions to be scheduled.
    	{"schedule", "flagalloc"},
    	// regalloc needs flags to be allocated first.
    	{"flagalloc", "regalloc"},
    	// loopRotate will confuse regalloc.
    	{"regalloc", "loop rotate"},
    	// trim needs regalloc to be done first.
    	{"regalloc", "trim"},
    	// memcombine works better if fuse happens first, to help merge stores.
    	{"late fuse", "memcombine"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:55:18 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/regalloc_test.go

    			Exit("v16"),
    		),
    		Bloc("b2",
    			Valu("v12", OpARM64CALLstatic, types.TypeMem, 0, AuxCallLSym("_"), "v1"),
    			Goto("b3"),
    		),
    	)
    	regalloc(f.f)
    	checkFunc(f.f)
    	// Double-check that we never restore to the G register. Regalloc should catch it, but check again anyway.
    	r := f.f.RegAlloc
    	for _, b := range f.blocks {
    		for _, v := range b.Values {
    			if v.Op == OpLoadReg && r[v.ID].String() == "g" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/deadcode.go

    }
    
    // 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.
    	reachable := ReachableBlocks(f)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 00:29:01 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/cache.go

    	locs   [2000]Location
    
    	// Reusable stackAllocState.
    	// See stackalloc.go's {new,put}StackAllocState.
    	stackAllocState *stackAllocState
    
    	scrPoset []*poset // scratch poset to be reused
    
    	// Reusable regalloc state.
    	regallocValues []valState
    
    	ValueToProgAfter []*obj.Prog
    	debugState       debugState
    
    	Liveness interface{} // *gc.livenessFuncCache
    
    	// Free "headers" for use by the allocators in allocators.go.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 15 23:00:54 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/stackalloc.go

    		}
    	}
    }
    
    func (f *Func) getHome(vid ID) Location {
    	if int(vid) >= len(f.RegAlloc) {
    		return nil
    	}
    	return f.RegAlloc[vid]
    }
    
    func (f *Func) setHome(v *Value, loc Location) {
    	for v.ID >= ID(len(f.RegAlloc)) {
    		f.RegAlloc = append(f.RegAlloc, nil)
    	}
    	f.RegAlloc[v.ID] = loc
    }
    
    func (s *stackAllocState) buildInterferenceGraph() {
    	f := s.f
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 21:29:41 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/value.go

    func (v *Value) Reg() int16 {
    	reg := v.Block.Func.RegAlloc[v.ID]
    	if reg == nil {
    		v.Fatalf("nil register for value: %s\n%s\n", v.LongString(), v.Block.Func)
    	}
    	return reg.(*Register).objNum
    }
    
    // Reg0 returns the register assigned to the first output of v, in cmd/internal/obj/$ARCH numbering.
    func (v *Value) Reg0() int16 {
    	reg := v.Block.Func.RegAlloc[v.ID].(LocPair)[0]
    	if reg == 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)
  8. src/cmd/compile/internal/ssa/lower.go

    				continue // ok not to lower
    			case OpMakeResult:
    				if b.Controls[0] == v {
    					continue
    				}
    			case OpGetG:
    				if f.Config.hasGReg {
    					// has hardware g register, regalloc takes care of it
    					continue // ok not to lower
    				}
    			}
    			s := "not lowered: " + v.String() + ", " + v.Op.String() + " " + v.Type.SimpleString()
    
    			for _, a := range v.Args {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 16 00:16:13 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/check.go

    		if valueMark[v.ID] {
    			f.Fatalf("used value v%d in free list", v.ID)
    		}
    	}
    
    	// Check to make sure all args dominate uses.
    	if f.RegAlloc == nil {
    		// Note: regalloc introduces non-dominating args.
    		// See TODO in regalloc.go.
    		sdom := f.Sdom()
    		for _, b := range f.Blocks {
    			for _, v := range b.Values {
    				for i, arg := range v.Args {
    					x := arg.Block
    					y := b
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/critical.go

    // license that can be found in the LICENSE file.
    
    package ssa
    
    // critical splits critical edges (those that go from a block with
    // more than one outedge to a block with more than one inedge).
    // Regalloc wants a critical-edge-free CFG so it can implement phi values.
    func critical(f *Func) {
    	// maps from phi arg ID to the new block created for that argument
    	blocks := f.Cache.allocBlockSlice(f.NumValues())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 21:40:11 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top