Hi All, I was reading Go compiler's SSA backend code at cmd/compile/internal/gc/ssa/go <https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go> & cmd/compile/internal/ssa <https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa>, and I keep on seeing some code generation logic depending on if a type is "SSA-able". For example, While building SSA tree for an assignment operation, I see comments like this <https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/ssa.go#L2719> :
*// We're assigning to a field of an ssa-able value. We need to build a new structure with the new value for the field we're assigning and the old values for the other fields. For instance:// type T struct {a, b, c int}// var T x// x.b = 5// For the x.b = 5 assignment we want to generate x = T{x.a, 5, x.c}* which seems like a sub-optimal way of updating only one element of a struct. My question is: *What is a SSA-able value/type for Go compiler? What is a SSA-able node in Go's AST representation? How is it different from other non SSA-able values? What special purpose does it serve?* Can anyone help me understand this/point me to links to existing literature around this? Thanks! Mohit -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAJ%2B6RRWCvFDCvSDu-ue_keoRFDJ2McE6yvuXK5BouiPRujXtYA%40mail.gmail.com.