[PATCH] D46874: [MC] - Add .stack_size sections into groups and link them with .text

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 01:37:03 PDT 2018


jhenderson added a comment.

@grimar, what is the link-time performance of doing this on something with many functions?

Also, I think it would make more sense for the stack sizes section names to be derived from the "parent" section, a bit like relocation sections, so they'd be called something like `.stack_sizes.text._Z3foov` or possibly simply `.stack_sizes._Z3foov`. That way dumping tools can more easily dump the specific individual stack_sizes sections.



================
Comment at: test/CodeGen/X86/stack-size-section.ll:16
 ; CHECK-NEXT: .Lfunc_begin1:
-; CHECK: .section .stack_sizes,"", at progbits
+; CHECK: .section .stack_sizes,"o", at progbits,.text,unique,1
 ; CHECK-NEXT: .quad .Lfunc_begin1
----------------
I might be misunderstanding something here, but I don't think these should be uniqued, i.e. in my opinion, in this case, there should only be one stack_sizes section containing both entries, since there is only one text section.


https://reviews.llvm.org/D46874





More information about the llvm-commits mailing list