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

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 09:42:55 PDT 2015


jfb added a comment.

> 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.


Can you clarify this? Is that a new thing? It at least seems like something that should be in a FIXME.


================
Comment at: lib/Transforms/IPO/MergeFunctions.cpp:1734
@@ +1733,3 @@
+  // There shouldn't be a mapping for G
+  assert(FNodesInTree.count(G) == 0);
+  
----------------
It's a more common style to do the following instead of having a comment:
```
assert(foo && "I expected foo because bar");
```


http://reviews.llvm.org/D12537





More information about the llvm-commits mailing list