tinygo/builder
Ayke van Laethem d606315515 builder: try to determine stack size information at compile time
For now, this is just an extra flag that can be used to print stack
frame information, but this is intended to provide a way to determine
stack sizes for goroutines at compile time in many cases.

Stack sizes are often somewhere around 350 bytes so are in fact not all
that big usually. Once this can be determined at compile time in many
cases, it is possible to use this information when available and as a
result increase the fallback stack size if the size cannot be determined
at compile time. This should reduce stack overflows while at the same
time reducing RAM consumption in many cases.

Interesting output for testdata/channel.go:

    function                                 stack usage (in bytes)
    Reset_Handler                            332
    .Lcommand-line-arguments.fastreceiver    220
    .Lcommand-line-arguments.fastsender      192
    .Lcommand-line-arguments.iterator        192
    .Lcommand-line-arguments.main$1          184
    .Lcommand-line-arguments.main$2          200
    .Lcommand-line-arguments.main$3          200
    .Lcommand-line-arguments.main$4          328
    .Lcommand-line-arguments.receive         176
    .Lcommand-line-arguments.selectDeadlock  72
    .Lcommand-line-arguments.selectNoOp      72
    .Lcommand-line-arguments.send            184
    .Lcommand-line-arguments.sendComplex     192
    .Lcommand-line-arguments.sender          192
    .Lruntime.run$1                          548

This shows that the stack size (if these numbers are correct) can in
fact be determined automatically in many cases, especially for small
goroutines. One of the great things about Go is lightweight goroutines,
and reducing stack sizes is very important to make goroutines
lightweight on microcontrollers.
2020-07-11 14:47:43 +02:00
..
ar.go builder: write a symbol table when writing out the compiler-rt lib 2019-11-13 13:52:20 +01:00
build.go builder: try to determine stack size information at compile time 2020-07-11 14:47:43 +02:00
buildcache.go main: refactor compile/link part to a builder package 2019-11-11 20:53:50 +01:00
builtins.go builder: make sure -fshort-enums is used consistently 2020-04-07 16:17:10 +02:00
cc1as.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
cc1as.h main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
clang.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
commands.go main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
config.go builder: move Go version code to goenv package 2020-05-27 13:08:17 +02:00
env.go builder: move Go version code to goenv package 2020-05-27 13:08:17 +02:00
error.go compiler: add location information to the IR checker 2019-12-21 20:49:51 +01:00
library.go builder: add support for 64-bit RISC-V 2020-07-08 00:21:59 +02:00
lld.cpp main: switch to LLVM 10 2020-04-09 20:23:51 +02:00
objcopy.go builder: use newer version of gohex 2020-06-01 19:03:15 +02:00
picolibc.go builder: fix picolibc include path 2020-04-29 15:41:08 +02:00
sizes.go builder: work around a bug in ld.lld in LLVM 10 2020-04-09 20:23:51 +02:00
tools-builtin.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools-external.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
tools.go builder: run tools (clang, ...) as separate processes 2020-04-03 12:41:44 +02:00
uf2.go targets: add target circuitplay-bluefruit 2020-01-06 09:23:39 +01:00