This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r272476 - in /trunk: gcc/go/gofrontend/MERGE gc...


Author: ian
Date: Wed Jun 19 15:13:53 2019
New Revision: 272476

URL: https://gcc.gnu.org/viewcvs?rev=272476&root=gcc&view=rev
Log:
    compiler: optimize string concatenations
    
    runtime.concatstring{2,3,4,5} are just wrappers of concatstrings.
    These wrappers don't provide any benefit, at least in the C
    calling convention we use, where passing arrays by value isn't an
    efficient thing. Change it to always use concatstrings.
    
    Also, the cap field of the slice passed to concatstrings is not
    necessary. So change it to pass a pointer and a length directly,
    which is more efficient than passing a slice header by value.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182539

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/gcc/go/gofrontend/expressions.cc
    trunk/gcc/go/gofrontend/runtime.def
    trunk/libgo/go/runtime/string.go


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]