[PATCH] D132929: [WebAssembly][MC] Avoid the need for .size directives for functions
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 11:22:41 PDT 2022
dschuff accepted this revision.
dschuff added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1702
if (needFuncLabelsForEHOrDebugInfo(*MF) ||
- MAI->hasDotTypeDotSizeDirective()) {
+ (MAI->hasDotTypeDotSizeDirective() && !TT.isWasm())) {
// Create a symbol for the end of function.
----------------
sbc100 wrote:
> dschuff wrote:
> > This isn't for .size, but for the func_end symbol. It looks like (line 1727 below) the func end is stored in a list of MBB section ranges, and MBBSectionRanges is used for debug info generation. Does removing this symbol have an effect on debug info?
> Right, but the func_end only has two possible uses.
>
> 1. needFuncLabelsForEHOrDebugInfo
> 2. For calculating the .size
>
> If neither of these is true there is no possible usage of the symbol. So we don't want to both creating this symbol at all except in these two cases.
oh haha right I forgot about the other half of the conditional :D
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132929/new/
https://reviews.llvm.org/D132929
More information about the llvm-commits
mailing list