DescriptionSubzero: Fix nondeterministic behavior in constant pool creation.
This issue was discovered as the result of a spurious "make check-lit" failure in undef.ll.
The problem is that constant pool label strings depend on the order the constants are created, and this order can be different with multithreaded translation.
Even -filetype=obj is affected by this, because the label string is put into the ELF .o file. This means that different runs of Subzero on the same input could potentially produce slightly different output.
The solution is to base the label name on the actual value of the constant. We do this by using the hex representation of the constant, rather than the sequence number of the constant within the pool. This actually simplifies things a bit, as we no longer need to track the sequence number.
In addition, for floating-point constant labels in asm-verbose mode, include a human-readable rendering of the value in the label name.
BUG= none
R=kschimpf@google.com
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=b36757e1cf19a443ed40128b43b8e2f1f8579eb0
Patch Set 1 #Patch Set 2 : Embed a human-readable floating-point value in the label name #Patch Set 3 : Update comment #
Messages
Total messages: 5 (1 generated)
|