[PATCH] D12537: [MergeFuncs] Efficiently defer functions on merge

Jason Koenig via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 17:08:51 PDT 2015


jrkoenig added a comment.

According to this C++ standard draft/prerelease/whatever <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf>, Section 23.2.4, paragraph 9 claims that only the elements erased are invalidated. This is subtle but correct usage. Sounds like I need to add some comments.

The alternative is to iterate over the tree and remove any copy of F that is found, which is quite expensive. The current implementation (which uses the ordering to find the right node) sometimes missed functions, which most likely occurs due to functions changed before they are actually removed from the tree, changing the implicit invariant of the tree that it's elements remain in a stable order.


http://reviews.llvm.org/D12537





More information about the llvm-commits mailing list