[PATCH] D53779: [CodeExtractor] Allow extracting allocas within simple stack{save, restore} pairs

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 26 17:19:27 PDT 2018


vsk added a comment.

In https://reviews.llvm.org/D53779#1277925, @efriedma wrote:

> __builtin_os_log_format_buffer_size is a compiler builtin which always returns a constant integer.


How were you able to tell? I couldn't parse this out from the BUILTIN declaration, but, I also don't have my head wrapped around the custom type-checking code for it.

At any rate, in clang's EmitAutoVarAlloca, arrays with a size given by this builtin have !Ty->isConstantSizeType(), hence the stack{save,restore}.

I'm not sure whether I need to keep digging into this. If this patch is only generally useful to handle VLAs, I think it'd still be worthwhile.


https://reviews.llvm.org/D53779





More information about the llvm-commits mailing list