sheredom / yair

🦜 yair - a high-level compiler IR entirely written in Rust
https://sheredom.github.io/yair
Creative Commons Zero v1.0 Universal
37 stars 1 forks source link

Stack frame allocation a la `alloca`? #19

Closed otrho closed 2 years ago

otrho commented 2 years ago

At the moment there seems to be support for globals only. Are there plans for alloca or does it not quite fit the design for some reason?

sheredom commented 2 years ago

You can do stack allocations with stackalloc (see https://github.com/sheredom/yair/blob/master/tests/lit/all/assembler/insts/stackalloc.ya for an example!).

otrho commented 2 years ago

Far out, how on earth did I miss that? Sorry!

sheredom commented 2 years ago

Pft no worries man - the documentation is still a work in progress 😄