- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for phi (0.18 sec)
-
src/cmd/compile/internal/ssagen/phi.go
} func (fwdRefAux) CanBeAnSSAAux() {} // insertPhis finds all the places in the function where a phi is // necessary and inserts them. // Uses FwdRef ops to find all uses of variables, and s.defvars to find // all definitions. // Phi values are inserted, and all FwdRefs are changed to a Copy // of the appropriate phi or definition. // TODO: make this part of cmd/compile/internal/ssa somehow? func (s *state) insertPhis() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 15.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/copyelim.go
} } } // phielim eliminates redundant phi values from f. // A phi is redundant if its arguments are all equal. For // purposes of counting, ignore the phi itself. Both of // these phis are redundant: // // v = phi(x,x,x) // v = phi(x,v,x,v) // // We repeat this process to also catch situations like: // // v = phi(x, phi(x, x), phi(x, v)) // // TODO: Can we also simplify cases like: //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 14:55:18 UTC 2024 - 3.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/trim.go
s.Pos = s.Pos.WithIsStmt() } } // If `s` had more than one predecessor, update its phi-ops to // account for the merge. if ns > 1 { for _, v := range s.Values { if v.Op == OpPhi { mergePhi(v, j, b) } } // Remove the phi-ops from `b` if they were merged into the // phi-ops of `s`. k := 0 for _, v := range b.Values { if v.Op == OpPhi { if v.Uses == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 4.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/shortcircuit.go
for i := 0; i < len(b.Values); i++ { phi := b.Values[i] if phi.Uses == 0 || phi == ctl || phi.Op != OpPhi { continue } fixPhi(phi, i) if phi.Block == b { continue } // phi got moved to a different block with v.moveTo. // Adjust phi values in this new block that refer // to phi to refer to the corresponding phi arg instead. // phi used to be evaluated prior to this block,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 03 17:47:02 UTC 2022 - 12.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/critical.go
continue } var phi *Value // determine if we've only got a single phi in this // block, this is easier to handle than the general // case of a block with multiple phi values. for _, v := range b.Values { if v.Op == OpPhi { if phi != nil { phi = nil break } phi = v } } // reset our block map if phi != nil { for _, v := range phi.Args {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 16 21:40:11 UTC 2023 - 3.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/branchelim_test.go
} if fun.values["phi"].Op != OpCondSelect { t.Fatalf("expected phi op to be CondSelect; found op %s", fun.values["phi"].Op) } if fun.values["phi"].Args[2] != fun.values["cond"] { t.Errorf("expected CondSelect condition to be %s; found %s", fun.values["cond"], fun.values["phi"].Args[2]) } if fun.blocks["entry"].Kind != BlockExit {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 24 15:51:15 UTC 2018 - 5.2K bytes - Viewed (0) -
pkg/test/loadbalancersim/timeseries/data.go
func (s sorted) max() float64 { if len(s) == 0 { return infinity } return s[len(s)-1] } func (s sorted) quantile(phi float64) float64 { if len(s) == 0 || math.IsNaN(phi) { return nan } if phi <= 0 { return s.min() } if phi >= 1 { return s.max() } idx := uint(phi*float64(len(s)-1) + 0.5) if idx >= uint(len(s)) { idx = uint(len(s) - 1) } return s[idx] }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Feb 03 18:19:25 UTC 2022 - 2.1K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/loopreschedchecks.go
// Insert phi functions as necessary for future changes to flow graph. for i, emc := range tofixBackedges { e := emc.e h := e.b // find the phi function for the memory input at "h", if there is one. var headerMemPhi *Value // look for header mem phi for _, v := range h.Values { if v.Op == OpPhi && v.Type.IsMemory() { headerMemPhi = v } } if headerMemPhi == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 21:17:10 UTC 2023 - 16K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/deadcode.go
// Adjust c.Preds c.removePred(j) // Remove phi args from c's phis. for _, v := range c.Values { if v.Op != OpPhi { continue } c.removePhiArg(v, j) // Note: this is trickier than it looks. Replacing // a Phi with a Copy can in general cause problems because // Phi and Copy don't have exactly the same semantics. // Phi arguments always come from a predecessor block,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 00:29:01 UTC 2023 - 9.2K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/block.go
b.Fatalf("inconsistent state for %v, num predecessors: %d, num phi args: %d", phi, n, numPhiArgs) } phi.Args[i].Uses-- phi.Args[i] = phi.Args[n] phi.Args[n] = nil phi.Args = phi.Args[:n] phielimValue(phi) } // LackingPos indicates whether b is a block whose position should be inherited // from its successors. This is true if all the values within it have unreliable positions
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 15:44:14 UTC 2024 - 12.2K bytes - Viewed (0)