why the values in ssa block can be unordered?

52 views
Skip to first unread message

xie cui

unread,
Aug 7, 2020, 12:28:00 PM8/7/20
to golang-nuts
https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/block.go#L60
in my opinion, the values are like instructions, why can it be unordered?

Keith Randall

unread,
Aug 7, 2020, 8:38:59 PM8/7/20
to golang-nuts
All the ordering required is explicit in the representation. If x is an argument of y, then x must come before y (in the eventual assembly output).
There is no other need for ordering within a basic block. Any order consistent with the argument ordering I mentioned above is ok.

Reply all
Reply to author
Forward
0 new messages