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

Eric Christopher via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 16:40:44 PST 2017


echristo added a comment.

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


Repository:
  rL LLVM

https://reviews.llvm.org/D39950





More information about the llvm-commits mailing list