1
0
mirror of https://github.com/golang/go synced 2024-10-04 04:31:21 -06:00
go/src/cmd
Josh Bleecher Snyder 1848d71445 cmd/gc: don't give credit for NOPs during register allocation
The register allocator decides which variables should be placed into registers by charging for each load/store and crediting for each use, and then selecting an allocation with minimal cost. NOPs will be eliminated, however, so using a variable in a NOP should not generate credit.

Issue 7867 arises from attempted registerization of multi-word variables because they are used in NOPs. By not crediting for that use, they will no longer be considered for registerization.

This fix could theoretically lead to better register allocation, but NOPs are rare relative to other instructions.

Fixes #7867.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/94810044
2014-05-09 09:55:17 -07:00
..
5a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
5c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
5g cmd/gc: don't give credit for NOPs during register allocation 2014-05-09 09:55:17 -07:00
5l runtime: use duff zero and copy to initialize memory 2014-05-07 13:17:10 -07:00
6a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
6c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
6g cmd/gc: don't give credit for NOPs during register allocation 2014-05-09 09:55:17 -07:00
6l liblink, cmd/ld: reenable nosplit checking and test 2014-04-16 22:08:00 -04:00
8a liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
8c liblink, cmd/gc, cmd/{5,6,8}{a,c}: rename linkwriteobj to writeobj 2014-04-16 14:36:44 -07:00
8g cmd/gc: don't give credit for NOPs during register allocation 2014-05-09 09:55:17 -07:00
8l liblink, cmd/ld: reenable nosplit checking and test 2014-04-16 22:08:00 -04:00
addr2line cmd/addr2line: skip broken TestAddr2Line on plan9 (fixes build) 2014-05-07 11:58:25 +10:00
api std lib: fix various typos in comments 2014-05-02 13:17:55 -07:00
cc build: remove tmp dir names from objects, support GOROOT_FINAL again 2014-04-15 20:46:46 -04:00
cgo all: spelling tweaks, A-G 2014-04-29 12:44:40 -04:00
dist cmd/dist: permit go* tag in main branch when it includes "beta" 2014-05-01 12:13:32 -04:00
fix cmd/fix: remove obsolete testdata. 2013-06-02 15:40:32 +02:00
gc cmd/gc: avoid %L in error message 2014-04-20 11:02:01 +02:00
go cmd/go: mark regexp as dependency of testmain 2014-05-09 12:19:00 -04:00
gofmt cmd/gofmt: minor internal cleanups 2014-02-27 09:00:27 -08:00
ld cmd/ld: correct pe section number in symbol table 2014-05-06 11:40:43 +10:00
link src: fix issues found by go vet std 2014-04-26 19:54:48 -07:00
nm cmd/nm: do not fail TestNM if symbol has less then 3 columns in nm output 2014-04-21 21:12:18 +10:00
objdump cmd/objdump: actually accept hex address without "0x" prefix. 2014-05-08 01:25:56 -04:00
pack src: fix issues found by go vet std 2014-04-26 19:54:48 -07:00
yacc cmd/yacc: expr example support windows 2013-12-19 12:14:07 -05:00