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

Issue 358013003: Subzero: Partial implementation of global initializers. (Closed)

Created:
6 years, 6 months ago by Jim Stichnoth
Modified:
6 years, 5 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Partial implementation of global initializers. This is still missing a couple things: 1. It only supports flat arrays and zeroinitializers. Arrays of structs are not yet supported. 2. Initializers can't yet contain relocatables, e.g. the address of another global.Mod Some changes are made to work around an llvm-mc assembler bug. When assembling using intel syntax, llvm-mc doesn't correctly parse symbolic constants or add relocation entries in some circumstances. Call instructions work, and use in a memory operand works, e.g. mov eax, [ArrayBase+4*ecx]. To work around this, we adjust legalize() to not allow ConstantRelocatable by default, except for memory operands and when called from lowerCall(), so the relocatable ends up being the source operand of a mov instruction. Then, the mov emit routine actually emits an lea instruction for such moves. A few lit tests needed to be adjusted to make szdiff work properly with respect to global initializers. In the new cross test, the driver calls test code that returns a pointer to an array with a global initializer, and the driver compares the arrays returned by llc and Subzero. BUG= none R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=de4ca71

Patch Set 1 #

Total comments: 1

Patch Set 2 : Run "make format" on the new cross tests #

Total comments: 24

Patch Set 3 : First-round updates #

Total comments: 5

Patch Set 4 : Second-round comments #

Patch Set 5 : After rebasing from laster master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+505 lines, -45 lines) Patch
M crosstest/runtests.sh View 2 chunks +8 lines, -0 lines 0 comments Download
A crosstest/test_global.h View 1 chunk +2 lines, -0 lines 0 comments Download
A crosstest/test_global.cpp View 1 1 chunk +65 lines, -0 lines 0 comments Download
A crosstest/test_global_main.cpp View 1 1 chunk +50 lines, -0 lines 0 comments Download
M src/IceInstX8632.cpp View 2 chunks +18 lines, -5 lines 0 comments Download
M src/IceTargetLowering.h View 1 chunk +23 lines, -0 lines 0 comments Download
M src/IceTargetLowering.cpp View 1 chunk +19 lines, -0 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 2 chunks +23 lines, -1 line 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 3 chunks +112 lines, -6 lines 0 comments Download
M src/llvm2ice.cpp View 1 2 3 4 4 chunks +52 lines, -5 lines 0 comments Download
M szdiff.py View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/convert.ll View 1 chunk +8 lines, -8 lines 0 comments Download
M tests_lit/llvm2ice_tests/global.ll View 1 2 1 chunk +2 lines, -5 lines 0 comments Download
A tests_lit/llvm2ice_tests/globalinit.pnacl.ll View 1 2 3 1 chunk +103 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll View 6 chunks +11 lines, -11 lines 0 comments Download
M tests_lit/llvm2ice_tests/shift.ll View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Jim Stichnoth
https://codereview.chromium.org/358013003/diff/1/szdiff.py File szdiff.py (right): https://codereview.chromium.org/358013003/diff/1/szdiff.py#newcode45 szdiff.py:45: ignore_pattern = re.compile('^ *$|^declare|^@.*\]$') This makes szdiff not ignore ...
6 years, 6 months ago (2014-06-27 00:24:14 UTC) #1
jvoung (off chromium)
https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2647 src/IceTargetLoweringX8632.cpp:2647: // .comm NAME, SIZE, ALIGN Should this be in ...
6 years, 5 months ago (2014-06-27 19:29:28 UTC) #2
wala
https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2453 src/IceTargetLoweringX8632.cpp:2453: // emitter is used. The condition logic for NeedsReg ...
6 years, 5 months ago (2014-06-27 21:35:25 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2453 src/IceTargetLoweringX8632.cpp:2453: // emitter is used. On 2014/06/27 21:35:25, wala wrote: ...
6 years, 5 months ago (2014-06-28 00:28:13 UTC) #4
jvoung (off chromium)
Otherwise LGTM https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2647 src/IceTargetLoweringX8632.cpp:2647: // .comm NAME, SIZE, ALIGN On 2014/06/28 ...
6 years, 5 months ago (2014-06-28 17:00:33 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp File src/IceTargetLoweringX8632.cpp (right): https://codereview.chromium.org/358013003/diff/20001/src/IceTargetLoweringX8632.cpp#newcode2647 src/IceTargetLoweringX8632.cpp:2647: // .comm NAME, SIZE, ALIGN On 2014/06/28 17:00:32, jvoung ...
6 years, 5 months ago (2014-06-29 14:33:46 UTC) #6
Jim Stichnoth
Committed patchset #5 manually as rde4ca71 (presubmit successful).
6 years, 5 months ago (2014-06-29 15:13:52 UTC) #7
wala
6 years, 5 months ago (2014-06-30 17:28:24 UTC) #8
Message was sent while issue was closed.
lgtm as well

Powered by Google App Engine
This is Rietveld 408576698