[PATCH] D39950: [DebugInfo] Stable sort symbols to remove non-deterministic ordering

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 09:32:30 PST 2017


mgrang added a comment.

In https://reviews.llvm.org/D39950#947475, @echristo wrote:

> In https://reviews.llvm.org/D39950#942919, @probinson wrote:
>
> > @echristo does it make sense to emit aranges without the symbols being emitted yet?
>
>
> Everything needs to be laid out already - so we have to basically be ready to emit asm before we can build the aranges table. Forward references are likely OK, but nothing can change any offsets. The way this is currently written also means that the order needs to be set before we can emit aranges too. I -think- that's the case, but verifying would be useful.
>
> In retrospect, I think a lot of how we emit aranges can be better done. That said, I think using a stable_sort here isn't going to hurt anything.
>
> @mgrang has a good point above that the "no order assigned" symbols also don't seem to be well defined. Hopefully there's only going to be one per section, but not necessarily and we don't verify that anywhere.
>
> -eric


Thanks for the reply Eric! Do you and @probinson  think this patch is good to merge?


Repository:
  rL LLVM

https://reviews.llvm.org/D39950





More information about the llvm-commits mailing list