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

Issue 321733002: PNaCl SIMD: allow element-aligned vector load/store (Closed)

Created:
6 years, 6 months ago by JF
Modified:
6 years, 6 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

PNaCl SIMD: allow element-aligned vector load/store PNaCl currently breaks up vector load/store instructions into the corresponding sub-elements of the vector using {insert/extract}element followed by scalar load/store. This was originally done so that version 0 of PNaCl SIMD wouldn't have to bother with vector load/store (especially their alignment), punting all complexity to existing scalar instructions. This is very suboptimal performance-wise, and re-creating the vector load/store on the translator side isn't a trivial matter and has several caveats. Add support for vector load/store, aligned to their element size, in PNaCl's ABI. R=jvoung@chromium.org TEST= (cd ./toolchain_build/out/llvm_i686_linux_work/ && ninja check) BUG= https://code.google.com/p/nativeclient/issues/detail?id=3870 Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=6cd52ee

Patch Set 1 #

Patch Set 2 : A few fixes. #

Patch Set 3 : Fix vector load/store alignment. #

Patch Set 4 : Rebase. #

Total comments: 10

Patch Set 5 : Address jvoung's comments. #

Patch Set 6 : Don't normalize vector alignment in StripAttributes. #

Patch Set 7 : Add alloca test. #

Total comments: 1

Patch Set 8 : s/,/./ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+425 lines, -181 lines) Patch
M lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp View 1 2 3 4 9 chunks +39 lines, -24 lines 0 comments Download
M lib/Transforms/NaCl/FixVectorLoadStoreAlignment.cpp View 1 2 4 chunks +53 lines, -22 lines 0 comments Download
M lib/Transforms/NaCl/StripAttributes.cpp View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M test/NaCl/Bitcode/vector.ll View 1 1 chunk +18 lines, -0 lines 0 comments Download
M test/NaCl/PNaClABI/instructions.ll View 1 1 chunk +78 lines, -3 lines 0 comments Download
M test/Transforms/NaCl/fix-vector-load-store-alignment.ll View 1 2 4 chunks +216 lines, -132 lines 0 comments Download
M test/Transforms/NaCl/replace-ptrs-with-ints.ll View 1 2 3 4 5 6 3 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
JF
PTAL, this is now ready for review.
6 years, 6 months ago (2014-06-10 01:27:19 UTC) #1
jvoung (off chromium)
Interesting, so no changes to the actual reader/writer left? https://codereview.chromium.org/321733002/diff/60001/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp File lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp (right): https://codereview.chromium.org/321733002/diff/60001/lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp#newcode60 lib/Analysis/NaCl/PNaClABIVerifyFunctions.cpp:60: ...
6 years, 6 months ago (2014-06-10 16:28:33 UTC) #2
JF
> Interesting, so no changes to the actual reader/writer left? No, vector pointers and load/store ...
6 years, 6 months ago (2014-06-10 18:26:29 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/321733002/diff/60001/test/NaCl/PNaClABI/instructions.ll File test/NaCl/PNaClABI/instructions.ll (right): https://codereview.chromium.org/321733002/diff/60001/test/NaCl/PNaClABI/instructions.ll#newcode157 test/NaCl/PNaClABI/instructions.ll:157: ; Vector memory operations. On 2014/06/10 18:26:29, JF wrote: ...
6 years, 6 months ago (2014-06-10 19:20:32 UTC) #4
JF
https://codereview.chromium.org/321733002/diff/60001/test/NaCl/PNaClABI/instructions.ll File test/NaCl/PNaClABI/instructions.ll (right): https://codereview.chromium.org/321733002/diff/60001/test/NaCl/PNaClABI/instructions.ll#newcode157 test/NaCl/PNaClABI/instructions.ll:157: ; Vector memory operations. > Right now we only ...
6 years, 6 months ago (2014-06-11 16:04:52 UTC) #5
jvoung (off chromium)
otherwise LGTM https://codereview.chromium.org/321733002/diff/120001/lib/Transforms/NaCl/StripAttributes.cpp File lib/Transforms/NaCl/StripAttributes.cpp (right): https://codereview.chromium.org/321733002/diff/120001/lib/Transforms/NaCl/StripAttributes.cpp#newcode167 lib/Transforms/NaCl/StripAttributes.cpp:167: // Already handled properly by FixVectorLoadStoreAlignment, trailing ...
6 years, 6 months ago (2014-06-11 16:14:17 UTC) #6
JF
6 years, 6 months ago (2014-06-11 16:23:58 UTC) #7
Message was sent while issue was closed.
Committed patchset #8 manually as r6cd52ee (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698