[PATCH] D58384: [ThinLTO] Fix test with reverse-iteration

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 09:37:47 PST 2019


mehdi_amini added a comment.

In D58384#1402418 <https://reviews.llvm.org/D58384#1402418>, @evgeny777 wrote:

> Summary clusters, nodes and edges are retrieved from DenseMap with arbitrary order, which doesn't make result DOT file invalid.
>  Reverse iteration just exposes test issues.


The dot file is not invalid, but the output is sensitive to "arbitrary order" as you mentioned: this is not desirable. We should strive toward canonicalizing toward an order independent of the container properties.
So instead of iterating a DenseMap and emitting the output, there should be another step that sort the nodes in a deterministic way.

Actually this is already implemented for the bitcode emission I believe, even if the bitcode wouldn't be invalid either. The same logic should also be done for the DOT emission I believe.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58384/new/

https://reviews.llvm.org/D58384





More information about the llvm-commits mailing list