[PATCH] D43036: Use a stable topological sort instead of std::stable_sort in DIE *DwarfCompileUnit::createScopeChildrenDIE()
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 14:27:03 PST 2018
aprantl added a comment.
In https://reviews.llvm.org/D43036#1001124, @vsapsai wrote:
> Sorting algorithm looks correct to me and in debugger it works as expected. I don't think we are going to visit `DbgVariable` more than 3 times so time complexity is reasonable too.
>
> There is a problem with `SmallDenseSet` size and other than that maybe improve testing? Some of the ideas: make variables in order "array, unrelated, vla_expr" to expose problem with std::stable_sort; have dependencies that aren't local variables (this can be already covered by other tests); have more than 8 local variables that is not a power of 2.
This really difficult because we can only very indirectly influence the order in which variables appear in the LexcicalScopes data structure from LLVM IR input. But I'll try!
https://reviews.llvm.org/D43036
More information about the llvm-commits
mailing list