• Josh Bleecher Snyder's avatar
    cmd/compile: enable CSE of constant strings · e22ba7f0
    Josh Bleecher Snyder authored
    CL 27254 changed a constant string to a byte array
    in encoding/hex and got significant performance
    improvements.
    
    hex.Encode used the string twice in a single function.
    The rewrite rules lower constant strings into components.
    The pointer component requires an aux symbol.
    The existing implementation created a new aux symbol every time.
    As a result, constant string pointers were never CSE'd.
    Tighten then moved the pointer calculation next to the uses, i.e.
    into the loop.
    
    The re-use of aux syms enabled by this CL
    occurs 3691 times during make.bash.
    
    This CL should not go in without CL 38338
    or something like it.
    
    Change-Id: Ibbf5b17283c0e31821d04c7e08d995c654de5663
    Reviewed-on: https://go-review.googlesource.com/28219
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    e22ba7f0
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...