On Thu, Sep 12, 2013 at 8:29 PM, Chandler Carruth <[email protected]>wrote:
> Furthermore, I don't why this would not be trivial to implement: >> >> 1. We add an intrinsic, like alloca, called alloca_in_caller. This is >> only allowed in functions marked always_inline. >> 2. To the analysis passes, alloca_in_caller looks like malloc >> 3. When the inliner inlines a alloca_in_caller call, it transforms it >> into an alloca call >> >> (and that's it I think). Perhaps I'm way off base, but it seems fairly >> simple. Is there anything else that's needed? >> > > You don't need any of the inline stuff. You just need some builtin which > directly produces a dynamically sized alloca instruction and the > stacksave/stackrestore pair to manage its lifetime. > Ugh, that's a lie. You need to be able to use this builtin and generate the stack save and stack restore bits in constructors and destructors. Yuck.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
