• David Chase's avatar
    cmd/compile: check loop rescheduling with stack bound, not counter · d71f36b5
    David Chase authored
    After benchmarking with a compiler modified to have better
    spill location, it became clear that this method of checking
    was actually faster on (at least) two different architectures
    (ppc64 and amd64) and it also provides more timely interruption
    of loops.
    
    This change adds a modified FOR loop node "FORUNTIL" that
    checks after executing the loop body instead of before (i.e.,
    always at least once).  This ensures that a pointer past the
    end of a slice or array is not made visible to the garbage
    collector.
    
    Without the rescheduling checks inserted, the restructured
    loop from this  change apparently provides a 1% geomean
    improvement on PPC64 running the go1 benchmarks; the
    improvement on AMD64 is only 0.12%.
    
    Inserting the rescheduling check exposed some peculiar bug
    with the ssa test code for s390x; this was updated based on
    initial code actually generated for GOARCH=s390x to use
    appropriate OpArg, OpAddr, and OpVarDef.
    
    NaCl is disabled in testing.
    
    Change-Id: Ieafaa9a61d2a583ad00968110ef3e7a441abca50
    Reviewed-on: https://go-review.googlesource.com/36206
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarCherry Zhang <cherryyz@google.com>
    d71f36b5
Name
Last commit
Last update
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...