Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Issue 1386593004: Subzero: Fix nondeterministic behavior in constant pool creation. (Closed)

Created:
5 years, 2 months ago by Jim Stichnoth
Modified:
5 years, 2 months ago
Reviewers:
Karl, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Subzero: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -77 lines) Patch
M src/IceELFObjectWriter.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/IceFixups.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/IceGlobalContext.cpp View 3 chunks +2 lines, -4 lines 0 comments Download
M src/IceOperand.h View 1 2 9 chunks +49 lines, -25 lines 0 comments Download
M src/IceTargetLoweringARM32.h View 1 chunk +7 lines, -7 lines 0 comments Download
M src/IceTargetLoweringARM32.cpp View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX8664.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M src/IceTargetLoweringX86BaseImpl.h View 1 5 chunks +5 lines, -5 lines 0 comments Download
M tests_lit/llvm2ice_tests/bitcast.ll View 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/elf_container.ll View 7 chunks +18 lines, -18 lines 0 comments Download
M tests_lit/llvm2ice_tests/randomize-pool-immediate-basic.ll View 6 chunks +6 lines, -6 lines 0 comments Download
M tests_lit/llvm2ice_tests/undef.ll View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Jim Stichnoth
5 years, 2 months ago (2015-10-03 17:55:28 UTC) #2
Jim Stichnoth
Updated the CL to append a human-readable value to the label for floating-point constants.
5 years, 2 months ago (2015-10-05 13:46:34 UTC) #3
Karl
Otherwise, LGTM.
5 years, 2 months ago (2015-10-05 17:54:51 UTC) #4
Jim Stichnoth
5 years, 2 months ago (2015-10-05 20:55:55 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
b36757e1cf19a443ed40128b43b8e2f1f8579eb0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698