]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/testsuite/ChangeLog
compiler: add an option to emit optimization diagnostics
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 May 2019 00:14:17 +0000 (00:14 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 May 2019 00:14:17 +0000 (00:14 +0000)
commit8dc24d984d8563616f9979496d67037fabef2101
treef8579ea0f1e87d926a24f76f63ead381e96c34be
parentea0faa42522d50bc877bfc0bb60acf9b54b60290
compiler: add an option to emit optimization diagnostics

    Add a -fgo-debug-optimization option to emit optimization
    diagnostics. This can be used for testing optimizations. Apply
    this to the range clear optimizations of maps and arrays.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170002

gcc/go:

* lang.opt (-fgo-debug-optimization): New option.
* go-c.h (struct go_create_gogo_args): Add debug_optimization
field.
* go-lang.c (go_langhook_init): Set debug_optimization field.
* gccgo.texi (Invoking gccgo): Document -fgo-debug-optimization.

gcc/testsuite:

* go.dg/arrayclear.go: New test.
* go.dg/mapclear.go: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270993 138bc75d-0d04-0410-961f-82ee72b054a4
13 files changed:
gcc/go/ChangeLog
gcc/go/gccgo.texi
gcc/go/go-c.h
gcc/go/go-lang.c
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/go.cc
gcc/go/gofrontend/gogo.cc
gcc/go/gofrontend/gogo.h
gcc/go/gofrontend/statements.cc
gcc/go/lang.opt
gcc/testsuite/ChangeLog
gcc/testsuite/go.dg/arrayclear.go [new file with mode: 0644]
gcc/testsuite/go.dg/mapclear.go [new file with mode: 0644]