1. 19 Apr, 2019 4 commits
    • Josh Bleecher Snyder's avatar
      cmd/compile: move phi tighten after critical · c1544ff9
      Josh Bleecher Snyder authored
      The phi tighten pass moves rematerializable phi args
      to the immediate predecessor of the phis.
      This reduces value lifetimes for regalloc.
      
      However, the critical edge removal pass can introduce
      new blocks, which can change what a block's
      immediate precedessor is. This can result in tightened
      phi args being spilled unnecessarily.
      
      This change moves the phi tighten pass after the
      critical edge pass, when the block structure is stable.
      
      This improves the code generated for
      
      func f(s string) bool { return s == "abcde" }
      
      Before this change:
      
      "".f STEXT nosplit size=44 args=0x18 locals=0x0
      	0x0000 00000 (x.go:3)	MOVQ	"".s+16(SP), AX
      	0x0005 00005 (x.go:3)	CMPQ	AX, $5
      	0x0009 00009 (x.go:3)	JNE	40
      	0x000b 00011 (x.go:3)	MOVQ	"".s+8(SP), AX
      	0x0010 00016 (x.go:3)	CMPL	(AX), $1684234849
      	0x0016 00022 (x.go:3)	JNE	36
      	0x0018 00024 (x.go:3)	CMPB	4(AX), $101
      	0x001c 00028 (x.go:3)	SETEQ	AL
      	0x001f 00031 (x.go:3)	MOVB	AL, "".~r1+24(SP)
      	0x0023 00035 (x.go:3)	RET
      	0x0024 00036 (x.go:3)	XORL	AX, AX
      	0x0026 00038 (x.go:3)	JMP	31
      	0x0028 00040 (x.go:3)	XORL	AX, AX
      	0x002a 00042 (x.go:3)	JMP	31
      
      Observe the duplicated blocks at the end.
      After this change:
      
      "".f STEXT nosplit size=40 args=0x18 locals=0x0
      	0x0000 00000 (x.go:3)	MOVQ	"".s+16(SP), AX
      	0x0005 00005 (x.go:3)	CMPQ	AX, $5
      	0x0009 00009 (x.go:3)	JNE	36
      	0x000b 00011 (x.go:3)	MOVQ	"".s+8(SP), AX
      	0x0010 00016 (x.go:3)	CMPL	(AX), $1684234849
      	0x0016 00022 (x.go:3)	JNE	36
      	0x0018 00024 (x.go:3)	CMPB	4(AX), $101
      	0x001c 00028 (x.go:3)	SETEQ	AL
      	0x001f 00031 (x.go:3)	MOVB	AL, "".~r1+24(SP)
      	0x0023 00035 (x.go:3)	RET
      	0x0024 00036 (x.go:3)	XORL	AX, AX
      	0x0026 00038 (x.go:3)	JMP	31
      
      Change-Id: I12c81aa53b89456cb5809aa5396378245f3beda9
      Reviewed-on: https://go-review.googlesource.com/c/go/+/172597
      Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      c1544ff9
    • Bryan C. Mills's avatar
      {,cmd/}vendor: rerun 'go mod vendor' to prune ignored files · d68ac591
      Bryan C. Mills authored
      Updates #31088
      
      Change-Id: Ia126e4e83ac5cb12c2c4151d5e5c975497598f24
      Reviewed-on: https://go-review.googlesource.com/c/go/+/172979Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      d68ac591
    • Bryan C. Mills's avatar
      cmd/go/internal/modcmd: skip files with the "ignore" constraint in 'go mod vendor' · 7f161265
      Bryan C. Mills authored
      'go mod vendor' already drops test files and testdata directories, so
      users should not expect the vendored module to include unnecessary
      files in general.
      
      Files tagged "ignore" are typically only used to refresh or regenerate
      source files within the module to be vendored, so users of that module
      do not need them.
      
      Fixes #31088
      
      Change-Id: I1ce9545e9b37c8e779a1826a9d494ac29d2cbfb8
      Reviewed-on: https://go-review.googlesource.com/c/go/+/172978
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7f161265
    • LE Manh Cuong's avatar
      cmd/compile: remove unused func nodfltconst · bdd7bb55
      LE Manh Cuong authored
      Its only usage was removed in golang.org/cl/103860
      
      Change-Id: I2a230b9475b0aadf3892b89f5e4ee6d4c5b70394
      Reviewed-on: https://go-review.googlesource.com/c/go/+/172917Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: Keith Randall <khr@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      bdd7bb55
  2. 18 Apr, 2019 10 commits
  3. 17 Apr, 2019 11 commits
  4. 16 Apr, 2019 15 commits