[PATCH] D31443: [LTO] Do not reorder global variables unnecessarily during merging

Tobias Edler von Koch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 15:48:29 PDT 2017


tobiasvk added a comment.

In https://reviews.llvm.org/D31443#712679, @Gerolf wrote:

> I'd love to see some comments an get your thoughts about a verifier.


I don't think we should add a verifier because there is no guarantee about the ordering of global variables or functions in the C/C++ standards. Any code that relies on it is pretty much broken (as has been pointed out during the discussion in the PR). The performance aspect is a different question, but I think the verifier should be about correctness, not optimal performance. We explicitly don't want to introduce a new guarantee about ordering here (or elsewehere).


https://reviews.llvm.org/D31443





More information about the llvm-commits mailing list