lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.5k stars 158 forks source link

Use `builder0` to allocate properly #2771

Closed advikkabra closed 2 months ago

advikkabra commented 2 months ago

Previously, in some places, LLVM allocations were made wherever needed, instead of at the start of the function as required. This led to repeated variable allocations, causing a stack overflow. This uses builder0 to allocate at the start of the function.