On 28/11/14 12:18 PM, Matthieu Monrocq wrote:
> 
> In this case, I have never heard of automatically moving an automatic
> variable to the heap, however LLVM routinely uses the stack for
> dynamically allocated variables if it can prove their lifetime (probably
> restricted to fixed-size variables below a certain threshold).

LLVM doesn't have escape analysis for dynamic allocations. It only has
primitive dead store elimination for malloc/free. It could be taught to
do escape analysis, but it would probably need to be very conservative
and only do it for <= pointer size allocations by default.

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to