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

Issue 427843002: Subzero: Add support for SSE4.1 instructions. (Closed)

Created:
6 years, 4 months ago by wala
Modified:
6 years, 4 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: Add support for SSE4.1 instructions. * Add initial support for code generation with SSE4.1 instructions. The following operations are affected: - multiplication with v4i32 - select - insertelement - extractelement * Add appropriate lit checks for SSE4.1 instructions. Run the crosstests in both SSE2 and SSE4.1 mode. * Introduce the -mattr flag to llvm2ice to control which instruction set gets used. BUG=none R=jvoung@chromium.org, stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=0a45051

Patch Set 1 #

Patch Set 2 : Blend instructions require SSE4.1 #

Patch Set 3 : Preserve crosstest order. #

Patch Set 4 : 1) Fix compilation 2) Fuse conditions in mul lowering to avoid code duplication #

Total comments: 11

Patch Set 5 : Address comments, round 1 #

Total comments: 7

Patch Set 6 : Use syntactically compatible asserts #

Patch Set 7 : Fix an empty line that was deleted #

Unified diffs Side-by-side diffs Delta from patch set Stats (+447 lines, -176 lines) Patch
M crosstest/crosstest.py View 2 chunks +4 lines, -0 lines 0 comments Download
M crosstest/runtests.sh View 1 2 1 chunk +131 lines, -103 lines 0 comments Download
M src/IceInstX8632.h View 5 chunks +12 lines, -6 lines 0 comments Download
M src/IceInstX8632.cpp View 1 2 3 4 5 6 9 chunks +85 lines, -19 lines 0 comments Download
M src/IceInstX8632.def View 1 chunk +3 lines, -3 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 5 chunks +24 lines, -6 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 12 chunks +80 lines, -37 lines 0 comments Download
M tests_lit/llvm2ice_tests/vector-arith.ll View 1 2 3 4 3 chunks +14 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/vector-ops.ll View 18 chunks +62 lines, -2 lines 0 comments Download
M tests_lit/llvm2ice_tests/vector-select.ll View 8 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
wala
6 years, 4 months ago (2014-07-29 18:42:52 UTC) #1
Jim Stichnoth
Otherwise lgtm. https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp#newcode539 src/IceInstX8632.cpp:539: assert(getDest()->getType() == IceType_v4i32 || It would be ...
6 years, 4 months ago (2014-07-29 23:01:17 UTC) #2
wala
https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp#newcode539 src/IceInstX8632.cpp:539: assert(getDest()->getType() == IceType_v4i32 || On 2014/07/29 23:01:16, stichnot wrote: ...
6 years, 4 months ago (2014-07-30 00:11:24 UTC) #3
wala
On 2014/07/30 00:11:24, wala wrote: > https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp > File src/IceInstX8632.cpp (right): > > https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp#newcode539 > ...
6 years, 4 months ago (2014-07-30 00:13:17 UTC) #4
Jim Stichnoth
https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp#newcode539 src/IceInstX8632.cpp:539: assert(getDest()->getType() == IceType_v4i32 || On 2014/07/30 00:11:24, wala wrote: ...
6 years, 4 months ago (2014-07-30 02:58:56 UTC) #5
jvoung (off chromium)
lgtm https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh File crosstest/runtests.sh (right): https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh#newcode16 crosstest/runtests.sh:16: for attribute in ${ATTRIBUTES} ; do We might ...
6 years, 4 months ago (2014-07-30 04:30:11 UTC) #6
Jim Stichnoth
https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh File crosstest/runtests.sh (right): https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh#newcode16 crosstest/runtests.sh:16: for attribute in ${ATTRIBUTES} ; do On 2014/07/30 04:30:11, ...
6 years, 4 months ago (2014-07-30 04:45:48 UTC) #7
wala
https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp File src/IceInstX8632.cpp (right): https://codereview.chromium.org/427843002/diff/50011/src/IceInstX8632.cpp#newcode539 src/IceInstX8632.cpp:539: assert(getDest()->getType() == IceType_v4i32 || On 2014/07/30 02:58:56, stichnot wrote: ...
6 years, 4 months ago (2014-07-30 18:11:55 UTC) #8
wala
Committed patchset #7 manually as r0a45051 (presubmit successful).
6 years, 4 months ago (2014-07-30 19:44:42 UTC) #9
jvoung (off chromium)
6 years, 4 months ago (2014-07-31 23:38:17 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh
File crosstest/runtests.sh (right):

https://codereview.chromium.org/427843002/diff/70001/crosstest/runtests.sh#ne...
crosstest/runtests.sh:16: for attribute in ${ATTRIBUTES} ; do
On 2014/07/30 04:45:47, stichnot wrote:
> On 2014/07/30 04:30:11, jvoung wrote:
> > We might want to start parallelizing some of these compiles, once we add
more
> > attributes =)
> > 
> > Maybe I'll look into that, if you guys haven't already started looking into
> it.
> 
> Right, I forgot to mention the same in my review. :)
> 
> By parallelizing, you mean adding them to the lit framework, right?  That's on
> "the list", but I didn't have any immediate plans to do it yet.

Ah sorry for the delay in the reply and I didn't get it done before vacation,
though I volunteered...

Yes, we could try to fit it into the lit framework. Some things to watch out
for, but hadn't considered fully:

(*) How to be able to loop through attributes, arches, and optlevels in the lit
framework, without have to unroll the loops?  Currently, our .ll files have
multiple run lines, and we end up with some duplication. That's okay for the
.ll, since we often have different CHECK lines and check-prefixes. These cross
tests just check the exit status though, so it's more amenable to just looping.

Perhaps this can be handled, if each test case has a "RUN" line that invokes a
script, and the script can then loop through. Then at least there is some
parallelism between the test cases, but not the loops within the test cases.

(*) Naming the test cases / setting up "config.suffixes": I think the test cases
would have to use a suffix that is not ".cpp" or ".ll", since one test case
consists of multiple .cpp/.ll files. That's a bit different from the usual use
of lit, where each .ll and .cpp are individual test cases. Maybe it doesn't
matter and we just make the individual tests have .py suffixes.

Otherwise, I had considered a quick and dirty use of bash "&" plus "wait"...

Powered by Google App Engine
This is Rietveld 408576698