[PATCH] D46564: [SSAUpdaterBulk] Sort blocks in IDF to avoid non-determinism.

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 7 17:56:11 PDT 2018


dberlin added a comment.

> IDF does not guarantee that returned basic blocks are sorted in any
>  order,



1. It looks like, in theory, this is true, but could easily be solved in IDF.

2.Given that, if this is a thing pretty much all clients of idf will have to handle, should we just sort the output of IDF?

The solution in IDF should just be changing domtreenodepair to a tuple, with the last item being domtreenode->getDFSNumIn()

That should provide a unique and guaranteed ordering for IDF.


Repository:
  rL LLVM

https://reviews.llvm.org/D46564





More information about the llvm-commits mailing list