Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NumBlocks (0.56 sec)

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

    func layoutOrder(f *Func) []*Block {
    	order := make([]*Block, 0, f.NumBlocks())
    	scheduled := f.Cache.allocBoolSlice(f.NumBlocks())
    	defer f.Cache.freeBoolSlice(scheduled)
    	idToBlock := f.Cache.allocBlockSlice(f.NumBlocks())
    	defer f.Cache.freeBlockSlice(idToBlock)
    	indegree := f.Cache.allocIntSlice(f.NumBlocks())
    	defer f.Cache.freeIntSlice(indegree)
    	posdegree := f.newSparseSet(f.NumBlocks()) // blocks with positive remaining degree
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/dom.go

    func dominatorsSimple(f *Func) []*Block {
    	// A simple algorithm for now
    	// Cooper, Harvey, Kennedy
    	idom := make([]*Block, f.NumBlocks())
    
    	// Compute postorder walk
    	post := f.postorder()
    
    	// Make map from block id to order index (for intersect call)
    	postnum := f.Cache.allocIntSlice(f.NumBlocks())
    	defer f.Cache.freeIntSlice(postnum)
    	for i, b := range post {
    		postnum[b.ID] = i
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Dec 03 17:08:51 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/lca.go

    	depth      int32 // depth in dominator tree (root=0, its children=1, etc.)
    }
    
    func makeLCArange(f *Func) *lcaRange {
    	dom := f.Idom()
    
    	// Build tree
    	blocks := make([]lcaRangeBlock, f.NumBlocks())
    	for _, b := range f.Blocks {
    		blocks[b.ID].b = b
    		if dom[b.ID] == nil {
    			continue // entry or unreachable
    		}
    		parent := dom[b.ID].ID
    		blocks[b.ID].parent = parent
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 30 21:52:15 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/tighten.go

    	canMove := f.Cache.allocBoolSlice(f.NumValues())
    	defer f.Cache.freeBoolSlice(canMove)
    
    	// Compute the memory states of each block.
    	startMem := f.Cache.allocValueSlice(f.NumBlocks())
    	defer f.Cache.freeValueSlice(startMem)
    	endMem := f.Cache.allocValueSlice(f.NumBlocks())
    	defer f.Cache.freeValueSlice(endMem)
    	memState(f, startMem, endMem)
    
    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    			if v.Op.isLoweredGetClosurePtr() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 01:01:38 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/flagalloc.go

    	// Compute the in-register flag value we want at the end of
    	// each block. This is basically a best-effort live variable
    	// analysis, so it can be much simpler than a full analysis.
    	end := f.Cache.allocValueSlice(f.NumBlocks())
    	defer f.Cache.freeValueSlice(end)
    	po := f.postorder()
    	for n := 0; n < 2; n++ {
    		for _, b := range po {
    			// Walk values backwards to figure out what flag
    			// value we want in the flag register at the start
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/sparsetree.go

    type SparseTree []SparseTreeNode
    
    // newSparseTree creates a SparseTree from a block-to-parent map (array indexed by Block.ID).
    func newSparseTree(f *Func, parentOf []*Block) SparseTree {
    	t := make(SparseTree, f.NumBlocks())
    	for _, b := range f.Blocks {
    		n := &t[b.ID]
    		if p := parentOf[b.ID]; p != nil {
    			n.parent = p
    			n.sibling = t[p.ID].child
    			t[p.ID].child = b
    		}
    	}
    	t.numberBlock(f.Entry, 1)
    	return t
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/looprotate.go

    //	  CMPQ ...
    //	  JLT loop
    func loopRotate(f *Func) {
    	loopnest := f.loopnest()
    	if loopnest.hasIrreducible {
    		return
    	}
    	if len(loopnest.loops) == 0 {
    		return
    	}
    
    	idToIdx := f.Cache.allocIntSlice(f.NumBlocks())
    	defer f.Cache.freeIntSlice(idToIdx)
    	for i, b := range f.Blocks {
    		idToIdx[b.ID] = i
    	}
    
    	// Set of blocks we're moving, by ID.
    	move := map[ID]struct{}{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/deadcode.go

    	live, order = liveValues(f, reachable)
    	f.Cache.freeValueSlice(order)
    	return
    }
    
    // ReachableBlocks returns the reachable blocks in f.
    func ReachableBlocks(f *Func) []bool {
    	reachable := make([]bool, f.NumBlocks())
    	reachable[f.Entry.ID] = true
    	p := make([]*Block, 0, 64) // stack-like worklist
    	p = append(p, f.Entry)
    	for len(p) > 0 {
    		// Pop a reachable block
    		b := p[len(p)-1]
    		p = p[:len(p)-1]
    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