[PATCH] D44669: Use local symbols for creating .stack-size

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 27 09:34:39 PDT 2018


espindola added a comment.

> I understand that and I thought your change was good. Apologies,
>  if "bloating" sounded bad I should have used "extra" instead. What I
>  meant was - wouldn't the assembly output have doubled up local/global
>  symbols? My idea is, could we find some way to not have to emit the
>  additional local symbols in the assembly file and hopefully to
>  remove the special case code in mc that is needed to emit them?

Why are extra symbols *in the assembly* a problem? We normally don't print assembly and using local symbols means that we have only one place that has to implement the logic for using section symbols in relocations. I quite like the rule: CodeGen and user written assembly files use local symbols everywhere and the assembler optimizes that when possible.

Having said that, if you really find the assembly verbosity problematic, getFunctionBegin could return a section symbol when the current function is at the start of a section.


https://reviews.llvm.org/D44669





More information about the llvm-commits mailing list