go/src
Yi Yang fa50248ce6 cmd/compile: sparse conditional constant propagation
sparse conditional constant propagation can discover optimization opportunities that cannot be found by just combining constant folding and constant propagation and dead code elimination separately.

Updates #59399

Change-Id: Ia954e906480654a6f0cc065d75b5912f96f36b2e
GitHub-Last-Rev: 90fc02db99
GitHub-Pull-Request: golang/go#59575
Reviewed-on: https://go-review.googlesource.com/c/go/+/483875
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
2023-05-24 02:54:03 +00:00
..
archive all: add String for fs.{FileInfo,DirEntry} implementations 2023-05-04 16:27:35 +00:00
arena arena: add experimental arena package 2022-10-12 20:23:36 +00:00
bufio bufio: permit r.Reset(r) without infinite recursion 2023-02-10 18:56:01 +00:00
builtin builtin: add documentation for clear 2023-02-01 15:21:00 +00:00
bytes std: fix various nilness findings 2023-04-20 01:07:29 +00:00
cmd cmd/compile: sparse conditional constant propagation 2023-05-24 02:54:03 +00:00
cmp cmp: new package 2023-05-19 17:41:52 +00:00
compress compress/zlib: use binary.BigEndian consistently 2023-02-27 18:51:27 +00:00
container all: gofmt main repo 2022-04-11 16:34:30 +00:00
context all: make safe for new vet analyzer 2023-05-08 20:18:40 +00:00
crypto crypto/rsa: make DecryptPKCS1v15SessionKey warning more dire 2023-05-23 17:30:20 +00:00
database/sql database/sql,testing/quick: use reflect.Value.SetZero 2023-04-04 07:16:34 +00:00
debug debug/elf: define R_PPC64_REL24_P9NOTOC 2023-05-23 21:46:00 +00:00
embed all: add String for fs.{FileInfo,DirEntry} implementations 2023-05-04 16:27:35 +00:00
encoding encoding: document when marshaling methods can be added 2023-05-23 19:43:37 +00:00
errors errors: improve the godoc for Join and Unwrap 2023-03-30 23:49:50 +00:00
expvar expvar: convert f to atomic type 2022-11-10 05:17:55 +00:00
flag flag: panic if a flag is defined after being set 2023-04-21 22:25:02 +00:00
fmt fmt,math/big,net/url: fixes to old Benchmarks 2023-05-23 20:25:13 +00:00
go cmd/compile: report an error URL with error messages 2023-05-24 00:18:17 +00:00
hash hash/maphash: weaken avalanche test a bit 2023-05-17 14:45:20 +00:00
html html/template: expose ErrJSTemplate 2023-05-19 16:51:35 +00:00
image image/jpeg: return io.ErrUnexpectedEOF on truncated data 2023-02-24 00:03:48 +00:00
index/suffixarray all: fix misuses of "a" vs "an" 2023-04-04 14:20:53 +00:00
internal go/types, types2: enable interface inference 2023-05-23 22:13:57 +00:00
io io: prevent seeking to position prior to offsetwrite.base 2023-05-20 00:46:20 +00:00
log log/slog: JSONHandler doesn't use special source format 2023-05-23 20:22:03 +00:00
maps maps: enhance the robustness of the tests 2023-05-19 19:26:57 +00:00
math fmt,math/big,net/url: fixes to old Benchmarks 2023-05-23 20:25:13 +00:00
mime cmd/go: add check for unknown godebug setting 2023-04-18 13:19:19 +00:00
net fmt,math/big,net/url: fixes to old Benchmarks 2023-05-23 20:25:13 +00:00
os os: make TestProgWideChdir detect more possible failure cases 2023-05-24 00:38:42 +00:00
path all: add String for fs.{FileInfo,DirEntry} implementations 2023-05-04 16:27:35 +00:00
plugin plugin: fix duplicated word in comment 2023-04-18 13:43:02 +00:00
reflect reflect: make Value.IsZero not escape 2023-05-12 21:13:39 +00:00
regexp regexp: fix copy-paste typo on Regexp.UnmarshalText doc 2023-04-14 16:28:44 +00:00
runtime runtime: pad work.full and pad.empty to avoid false sharing 2023-05-24 01:03:09 +00:00
slices slices: add sorting and comparison functions 2023-05-23 23:33:29 +00:00
sort slices: add sorting and comparison functions 2023-05-23 23:33:29 +00:00
strconv all: add a few links in package godocs 2023-03-25 10:16:23 +00:00
strings strings: correct NewReader documentation 2023-05-12 17:40:51 +00:00
sync syscall: avoid serializing forks on ForkLock 2023-05-23 17:25:09 +00:00
syscall syscall: avoid serializing forks on ForkLock 2023-05-23 17:25:09 +00:00
testdata
testing cmd/go,testing: re-implement testing.Coverage 2023-05-23 11:37:31 +00:00
text text/template: reword uncover to unwrap 2023-05-01 15:57:43 +00:00
time time: update windows zoneinfo_abbrs 2023-05-12 20:01:59 +00:00
unicode all: upgrade Unicode from 13.0.0 to 15.0.0 2023-02-06 04:29:53 +00:00
unsafe unsafe: add docs for SliceData, String, and StringData 2022-11-09 22:11:13 +00:00
vendor cmd: go get golang.org/x/tools@8f7fb01dd429 and revendor 2023-05-09 01:28:01 +00:00
all.bash make.{bash,bat}: check unmodified $PATH for $GOROOT/bin presence 2023-04-19 14:36:22 +00:00
all.bat make.{bash,bat}: check unmodified $PATH for $GOROOT/bin presence 2023-04-19 14:36:22 +00:00
all.rc
bootstrap.bash cmd/dist: add map of broken ports and -force flag 2023-01-20 17:52:26 +00:00
buildall.bash all: use grep -E/-F instead of fgrep/egrep 2022-10-06 21:22:22 +00:00
clean.bash
clean.bat all.bat,clean.bat,race.bat,run.bat: call some.bat with .\some.bat 2022-05-12 16:59:17 +00:00
clean.rc
cmp.bash
go.mod cmd: go get golang.org/x/tools@8f7fb01dd429 and revendor 2023-05-09 01:28:01 +00:00
go.sum cmd: go get golang.org/x/tools@8f7fb01dd429 and revendor 2023-05-09 01:28:01 +00:00
make.bash make.bash, make.rc: fix GOROOT detection when GOEXPERIMENT is set 2023-01-17 22:30:56 +00:00
make.bat cmd/dist: add -distpack flag to build distribution archives 2023-04-11 21:29:13 +00:00
Make.dist
make.rc make.bash, make.rc: fix GOROOT detection when GOEXPERIMENT is set 2023-01-17 22:30:56 +00:00
race.bash cmd,runtime: enable race detector on s390x 2022-05-04 14:17:20 +00:00
race.bat all.bat,clean.bat,race.bat,run.bat: call some.bat with .\some.bat 2022-05-12 16:59:17 +00:00
README.vendor README.vendor: minor updates 2023-01-03 20:31:59 +00:00
run.bash run.bash: drop 'export GOROOT' and its obsolete comment 2023-03-30 15:55:17 +00:00
run.bat run: set GOENV=off when running 'go tool dist env' 2022-08-17 20:19:28 +00:00
run.rc run: set GOENV=off when running 'go tool dist env' 2022-08-17 20:19:28 +00:00

Vendoring in std and cmd
========================

The Go command maintains copies of external packages needed by the
standard library in the src/vendor and src/cmd/vendor directories.

There are two modules, std and cmd, defined in src/go.mod and
src/cmd/go.mod. When a package outside std or cmd is imported
by a package inside std or cmd, the import path is interpreted
as if it had a "vendor/" prefix. For example, within "crypto/tls",
an import of "golang.org/x/crypto/cryptobyte" resolves to
"vendor/golang.org/x/crypto/cryptobyte". When a package with the
same path is imported from a package outside std or cmd, it will
be resolved normally. Consequently, a binary may be built with two
copies of a package at different versions if the package is
imported normally and vendored by the standard library.

Vendored packages are internally renamed with a "vendor/" prefix
to preserve the invariant that all packages have distinct paths.
This is necessary to avoid compiler and linker conflicts. Adding
a "vendor/" prefix also maintains the invariant that standard
library packages begin with a dotless path element.

The module requirements of std and cmd do not influence version
selection in other modules. They are only considered when running
module commands like 'go get' and 'go mod vendor' from a directory
in GOROOT/src.

Maintaining vendor directories
==============================

Before updating vendor directories, ensure that module mode is enabled.
Make sure that GO111MODULE is not set in the environment, or that it is
set to 'on' or 'auto'.

Requirements may be added, updated, and removed with 'go get'.
The vendor directory may be updated with 'go mod vendor'.
A typical sequence might be:

    cd src
    go get golang.org/x/net@latest
    go mod tidy
    go mod vendor

Use caution when passing '-u' to 'go get'. The '-u' flag updates
modules providing all transitively imported packages, not only
the module providing the target package.

Note that 'go mod vendor' only copies packages that are transitively
imported by packages in the current module. If a new package is needed,
it should be imported before running 'go mod vendor'.