LTO and Inlining and Stack Frame Size

Inlining is more aggressive with LTO. This could lead to stack frame sizes growing. However, sometimes you’re working with software that is sensitive to stack sizes and would like to keep things within a certain limit (say 8K). Is there a way to achieve this with clang’s LTO (or indeed its inliner in general)?

-bw

This is probably better controlled in the inliner, and there are internal options there already for controlling various size thresholds. LTO doesn’t directly control inlining directly, it just provides a bigger scope. +Easwaran who works on the inliner and might be able to point you in the right direction.

Teresa

Thanks, Teresa. I’ll look at some of those options.