compiler: make use of specialized fast map routines

Programming / Compilers / GCC - ian [138bc75d-0d04-0410-961f-82ee72b054a4] - 6 June 2019 00:44 EDT

In the runtime there are specialized fast map routines for certain kep types. This CL lets the compiler make use of these functions, instead of always using the generic ones.

As we now generate multiple versions of map delete calls, to make things easier we delay the expansion of the built-in delete function to flatten phase.

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

26329c24fc2 compiler: make use of specialized fast map routines
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/escape.cc | 10 ++
gcc/go/gofrontend/expressions.cc | 237 ++++++++++++++++++++++++++++-----------
gcc/go/gofrontend/runtime.def | 59 ++++++++++
gcc/go/gofrontend/statements.cc | 145 +++++++++++++++++-------
gcc/go/gofrontend/types.cc | 45 +++++++-
gcc/go/gofrontend/types.h | 25 ++++-
libgo/go/runtime/map_fast32.go | 9 ++
libgo/go/runtime/map_fast64.go | 9 ++
libgo/go/runtime/map_faststr.go | 8 ++
10 files changed, 435 insertions(+), 114 deletions(-)

Upstream: gcc.gnu.org


  • Share