[llvm-commits] Fix some TableGen non-deterministic behavior.

Sean Silva silvas at purdue.edu
Sat Sep 15 13:10:36 PDT 2012


This patchset fixes two instances of nondeterministic iteration in the
TableGen output.

Patch 0001 refactors a comparator struct to be in Record.h. We already had
two of them, but the preexisting ones do string comparisons, while
LessRecordByID sorts by the Record's unique ID, which is just compares two
`unsigned`. Now we have three comparators, but they each have their use
cases I suppose.

Patch 0002 and 0003 each fix a particular instance of nondeterminism that I
found.

The way I was testing this was to put all of the generated files under
version control with git, and observe their changes when rebuilding. Is
there any way that we could do something like this with the generated files
from the buildbots? TableGen output should be the same on all of them,
right? and so aggregating their generated files should help to track down
any remaining nondeterminism.

--Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120915/0dbee599/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-Record-by-ID-comparator-to-Record.h.patch
Type: application/octet-stream
Size: 4605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120915/0dbee599/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Iterate-deterministically-over-register-classes.patch
Type: application/octet-stream
Size: 1461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120915/0dbee599/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-ClassInfo-iteration.patch
Type: application/octet-stream
Size: 1811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120915/0dbee599/attachment-0002.obj>


More information about the llvm-commits mailing list