[PATCH] D48783: [ThinLTO] Use std::map for import lists to get determistic imports files

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 13:20:52 PDT 2018


tejohnson added a comment.

In https://reviews.llvm.org/D48783#1148412, @steven_wu wrote:

> Does the iteration order of those map matters other than changing the hash? Will it change symbol resolution or importing different function?


No effect on importing/symbol resolution etc. In fact, this is not an input to the compiler at all, it is used by the build system. The change in order will just make it look to the build system like it has changed when it hasn't.

> The other option is MapVector, which preserve the insertion order, which might be faster than std::map.

The trickiness is that currently it may not be inserted in a deterministic order, because we use StringMap elsewhere in the thin link. So std::map is the most straightforward way to get the desired behavior.


Repository:
  rL LLVM

https://reviews.llvm.org/D48783





More information about the llvm-commits mailing list