We tracked down some non-determinism in compilation output to the
DFAJumpThreading pass. These changes fixed our issue:
- Make the DefMap type a MapVector to make its iteration order depend on insertion order.
- Sort the values to be inserted into NewDefs by instruction order to make the insertion order deterministic. Since these values come from iterating over a ValueMap, which doesn't have deterministic iteration order, I couldn't fix this at its source.
Please use SmallVector instead of the STL vector.