]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't compact liveness maps in place
authorAustin Clements <austin@google.com>
Fri, 13 Apr 2018 19:55:43 +0000 (15:55 -0400)
committerAustin Clements <austin@google.com>
Mon, 23 Apr 2018 16:32:16 +0000 (16:32 +0000)
commitbdb65da0490e695da0de6eba2b0d5da244e88293
treed70a6eb8b4b36efd9d4c14ee79b1e1ec09006859
parent3363e98371a5b4dd8d9b568a0cb6570583ce6781
cmd/compile: don't compact liveness maps in place

Currently Liveness.compact rewrites the Liveness.livevars slice in
place. However, we're about to add register maps, which we'll want to
track in livevars, but compact independently from the stack maps.
Hence, this CL modifies Liveness.compact to consume Liveness.livevars
and produce a new slice of deduplicated stack maps. This is somewhat
clearer anyway because it avoids potential confusion over how
Liveness.livevars is indexed.

Passes toolstash -cmp.

For #24543.

Change-Id: I7093fbc71143f8a29e677aa30c96e501f953ca2b
Reviewed-on: https://go-review.googlesource.com/108498
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/gc/plive.go