cmd/compile/internal/ssa: recognize constant pointer comparison
Teach the backend to recognize that the address of a symbol is equal with itself, and that the addresses of two different symbols are different. Some examples of where this rule hits in the standard library: - inlined uses of (*time.Time).setLoc (e.g. time.UTC) - inlined uses of bufio.NewReader (via type assertion) Change-Id: I23dcb068c2ec333655c1292917bec13bbd908c24 Reviewed-on: https://go-review.googlesource.com/38338Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment