[rfc][patch] Refactoring how we handle symbols for the end of sections

Rafael EspĂ­ndola rafael.espindola at gmail.com
Wed Mar 11 13:55:59 PDT 2015


I recently refactored how we handle creating symbols for the start of
sections. We were doing it in an ad-hoc way and producing .text files
that were harder to read (r231898 was the main change).

With the infrastructure in place, I am now looking at the symbol
pointing to the end of sections. They are not as common, but there are
some issues

* We can end up printing multiple symbols with the same purpose.
* We switch back to sections just to print them even when we could
have printed them earlier.

The second issues is particularly problematic with
-fno-unique-section-names, since trying to switch back to a section
marked with ", unique" actually creates a new one.

The attached WIP patch fixes the issue. I still have to clean up some
issues, like it changing the number of every .Ltmp* symbol, but for
now I would like some feedback on the direction.

Is the assembly output cleanup and unifying the end section symbol
sufficient to justify the patch? It should also make it easier to fix
the FIXME about subsections :-)

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: from-master.patch
Type: text/x-patch
Size: 49977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150311/3f366a20/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: just-this.patch
Type: text/x-patch
Size: 35614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150311/3f366a20/attachment-0001.bin>


More information about the llvm-commits mailing list