Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for Preds (0.03 sec)

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

    		// order, in which the predecessors edges are merged here.
    		p, i := b.Preds[0].b, b.Preds[0].i
    		s, j := b.Succs[0].b, b.Succs[0].i
    		ns := len(s.Preds)
    		p.Succs[i] = Edge{s, j}
    		s.Preds[j] = Edge{p, i}
    
    		for _, e := range b.Preds[1:] {
    			p, i := e.b, e.i
    			p.Succs[i] = Edge{s, len(s.Preds)}
    			s.Preds = append(s.Preds, Edge{p, i})
    		}
    
    		// Attempt to preserve a statement boundary
    		if bIsStmt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/ssa/fuse_branchredirect.go

    					continue
    				}
    				b.removePred(k)
    				p.Succs[pk.i] = Edge{child, len(child.Preds)}
    				// Fix up Phi value in b to have one less argument.
    				for _, v := range b.Values {
    					if v.Op != OpPhi {
    						continue
    					}
    					b.removePhiArg(v, k)
    				}
    				// Fix up child to have one more predecessor.
    				child.Preds = append(child.Preds, Edge{p, pk.i})
    				ai := b.Succs[out].i
    				for _, v := range child.Values {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 21:40:11 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/critical.go

    			// block, then we need to remove the
    			// corresponding elements from the block
    			// predecessors and phi args
    			if reusedBlock {
    				// Add p->d edge
    				p.Succs[pi] = Edge{d, len(d.Preds)}
    				d.Preds = append(d.Preds, Edge{p, pi})
    
    				// Remove p as a predecessor from b.
    				b.removePred(i)
    
    				// Update corresponding phi args
    				b.removePhiArg(phi, i)
    
    				// splitting occasionally leads to a phi having
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 21:40:11 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/fuse.go

    		if bx == c {
    			break
    		}
    		copyTo += len(bx.Values)
    	}
    	c.Values = t
    
    	// replace b->c edge with preds(b) -> c
    	c.predstorage[0] = Edge{}
    	if len(b.Preds) > len(b.predstorage) {
    		c.Preds = b.Preds
    	} else {
    		c.Preds = append(c.predstorage[:0], b.Preds...)
    	}
    	for i, e := range c.Preds {
    		p := e.b
    		p.Succs[e.i] = Edge{c, i}
    	}
    	f := b.Func
    	if f.Entry == b {
    		f.Entry = c
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/phiopt.go

    	for _, b := range f.Blocks {
    		if len(b.Preds) != 2 || len(b.Values) == 0 {
    			// TODO: handle more than 2 predecessors, e.g. a || b || c.
    			continue
    		}
    
    		pb0, b0 := b, b.Preds[0].b
    		for len(b0.Succs) == 1 && len(b0.Preds) == 1 {
    			pb0, b0 = b0, b0.Preds[0].b
    		}
    		if b0.Kind != BlockIf {
    			continue
    		}
    		pb1, b1 := b, b.Preds[1].b
    		for len(b1.Succs) == 1 && len(b1.Preds) == 1 {
    			pb1, b1 = b1, b1.Preds[0].b
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/flagalloc.go

    		b.Values = b.Values[:0]
    		// The current live flag value (the pre-flagalloc copy).
    		var flag *Value
    		if len(b.Preds) > 0 {
    			flag = end[b.Preds[0].b.ID]
    			// Note: the following condition depends on the lack of critical edges.
    			for _, e := range b.Preds[1:] {
    				p := e.b
    				if end[p.ID] != flag {
    					f.Fatalf("live flag in %s's predecessors not consistent", b)
    				}
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 6.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/tighten.go

    			for i, a := range v.Args {
    				if !a.rematerializeable() {
    					continue // not a constant we can move around
    				}
    				if a.Block == b.Preds[i].b {
    					continue // already in the right place
    				}
    				// Make a copy of a, put in predecessor block.
    				v.SetArg(i, a.copyInto(b.Preds[i].b))
    			}
    		}
    	}
    }
    
    // memState computes the memory state at the beginning and end of each block of
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 16 01:01:38 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/numberlines.go

    				v.Pos = firstPos.WithDefaultStmt() // default to default
    				break
    			}
    		}
    
    		if firstPosIndex == -1 { // Effectively empty block, check block's own Pos, consider preds.
    			line := src.NoXPos
    			for _, p := range b.Preds {
    				pbi := p.Block().ID
    				if !endlines[pbi].SameFileAndLine(line) {
    					if line == src.NoXPos {
    						line = endlines[pbi]
    						continue
    					} else {
    						line = src.NoXPos
    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/layout.go

    		}
    	}
    
    	// Initialize indegree of each block
    	for _, b := range f.Blocks {
    		if exit.contains(b.ID) {
    			// exit blocks are always scheduled last
    			continue
    		}
    		indegree[b.ID] = len(b.Preds)
    		if len(b.Preds) == 0 {
    			// Push an element to the tail of the queue.
    			zerodegree = append(zerodegree, b.ID)
    		} else {
    			posdegree.add(b.ID)
    		}
    	}
    
    	bid := f.Entry.ID
    blockloop:
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 31 21:41:20 UTC 2022
    - 5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/dom.go

    	return order
    }
    
    type linkedBlocks func(*Block) []Edge
    
    func dominators(f *Func) []*Block {
    	preds := func(b *Block) []Edge { return b.Preds }
    	succs := func(b *Block) []Edge { return b.Succs }
    
    	//TODO: benchmark and try to find criteria for swapping between
    	// dominatorsSimple and dominatorsLT
    	return f.dominatorsLTOrig(f.Entry, preds, succs)
    }
    
    // dominatorsLTOrig runs Lengauer-Tarjan to compute a dominator tree starting at
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Dec 03 17:08:51 UTC 2022
    - 7.4K bytes
    - Viewed (0)
Back to top