[PATCH] please review, non-determinism bug fix in gvn

Benjamin Kramer benny.kra at gmail.com
Mon May 12 11:00:13 PDT 2014

On 12.05.2014, at 19:17, Daniel Reynaud <dreynaud at apple.com> wrote:

> The issue is that there is a DenseMap with pointers that is iterated on. This means a given input can result in many unpredictable and unreproducible outputs.
> Sorry for the lack of test case, but by definition this is very hard to reproduce and reduce.

Nice catch! I'm a bit afraid of adding an erase() member to MapVector as erasing from a vector is expensive. It looks like you can easily avoid the erasing in this case by not adding edges that are going to be split to the map at all (and assert that they're not in the map when doing the actual splitting). Sounds reasonable?

- Ben

More information about the llvm-commits mailing list