![]() This gives a small improvement now, and is needed to be able to use the Heap2Stack transform that's available in the Attributor pass. This Heap2Stack transform could replace our custom OptimizeAllocs pass. Most of the changes are just IR that changed, the actual change is relatively small. To give an example of why this is useful, here is the code size before this change: $ tinygo build -o test -size=short ./testdata/stdlib.go code data bss | flash ram 95620 1812 968 | 97432 2780 $ tinygo build -o test -size=short ./testdata/stdlib.go code data bss | flash ram 95380 1812 968 | 97192 2780 That's a 0.25% reduction. Not a whole lot, but nice for such a small patch. |
||
---|---|---|
.. | ||
testdata | ||
allocs.go | ||
allocs_test.go | ||
errors.go | ||
gc.go | ||
gc_test.go | ||
interface-lowering.go | ||
interface-lowering_test.go | ||
interrupt.go | ||
interrupt_test.go | ||
llvm.go | ||
maps.go | ||
maps_test.go | ||
optimizer.go | ||
panic.go | ||
panic_test.go | ||
rtcalls.go | ||
rtcalls_test.go | ||
stacksize.go | ||
stacksize_test.go | ||
transform.go | ||
transform_test.go | ||
util.go | ||
wasm-abi.go | ||
wasm-abi_test.go |