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

Issue 659513005: Allow conditional lit tests in Subzero, based on build flags. (Closed)

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

Description

Allow conditional lit tests in Subzero, based on build flags. Adds conditionality to lit tests in two ways: 1) Allows the use of "; REQUIRES: XXX" lines in lit tests. In this case, the tests defined by the file are only run if all REQUIRES are met. 2) Allows the conditional running of RUN commands, based on build flags. This comes in two subforms. There are predefined %ifX commands that run the command defined by remaining arguments, if the corresponding %X2i command is applicable. Alternatively, one can use %if with explicit '--att' arguments to define what conditions should be checked. In any case, unlike REQUIRES, the %if commands RUN all the time, but simply generate empty output, rather then output defined by the following command, if the condition is not met. These latter tests are useful when the same input is to be tested under different conditions, since the REQUIRES form does not allow this. Note that m2i, p2i, l2i, and lc2i are also conditionally controlled, so that they do nothing if the build did not construct the appropriate Subzero translator. This CL replaces https://codereview.chromium.org/644143002 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=b262c5e0b110e63ec706213adf0af202274c442e

Patch Set 1 #

Total comments: 24

Patch Set 2 : Fix issues raised by stichnot in patch set 1. #

Patch Set 3 : Fix tests to handle MINIMAL builds. #

Total comments: 28

Patch Set 4 : Fix issues in patch set 3. #

Total comments: 23

Patch Set 5 : Fix issues in patch set 4. #

Patch Set 6 : Fix nits. #

Total comments: 9

Patch Set 7 : Fix issues in patch set 6. #

Patch Set 8 : Use REQUIRES when appropriate in lit tests. #

Total comments: 6

Patch Set 9 : Fix issues in patch set 8. #

Total comments: 10

Patch Set 10 : Fix LLVM (i.e. trybot) builds to handle subzero. #

Total comments: 2

Patch Set 11 : Add -Wno-error=unused-parameter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -55 lines) Patch
M Makefile View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M Makefile.standalone View 1 2 3 4 5 6 7 8 4 chunks +25 lines, -5 lines 0 comments Download
A pydir/ifatts.py View 1 2 3 4 5 6 7 8 9 1 chunk +58 lines, -0 lines 0 comments Download
M src/IceTypes.h View 1 2 3 4 5 6 7 8 9 1 chunk +10 lines, -4 lines 0 comments Download
M src/IceTypes.cpp View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -0 lines 0 comments Download
M src/IceTypes.def View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M src/llvm2ice.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +52 lines, -0 lines 0 comments Download
M tests_lit/lit.cfg View 1 2 3 4 3 chunks +64 lines, -29 lines 0 comments Download
M tests_lit/llvm2ice_tests/addr-opt-multi-def-var.ll View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/align-spill-locations.ll View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/ebp_args.ll View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/global.ll View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/globalrelocs.ll View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
M tests_lit/llvm2ice_tests/phi.ll View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/llvm2ice_tests/struct-arith.pnacl.ll View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/reader_tests/binops.ll View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M tests_lit/reader_tests/extern_globals.ll View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M tests_lit/reader_tests/globalinit.pnacl.ll View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tests_lit/reader_tests/globalrelocs.ll View 1 2 3 4 1 chunk +2 lines, -4 lines 0 comments Download
M tests_lit/reader_tests/unnamed.ll View 1 2 3 4 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (1 generated)
Karl
6 years, 2 months ago (2014-10-14 22:54:36 UTC) #2
Jim Stichnoth
https://codereview.chromium.org/659513005/diff/1/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/1/Makefile.standalone#newcode44 Makefile.standalone:44: OBJDIR := build/min It looks like this creates subdirs ...
6 years, 2 months ago (2014-10-15 03:16:37 UTC) #3
Karl
https://codereview.chromium.org/659513005/diff/1/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/1/Makefile.standalone#newcode44 Makefile.standalone:44: OBJDIR := build/min On 2014/10/15 03:16:36, stichnot wrote: > ...
6 years, 2 months ago (2014-10-15 20:12:32 UTC) #4
jvoung (off chromium)
https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone#newcode56 Makefile.standalone:56: BUILD_ATTS := $(BUILD_ATTS) minimal p2i It seems like the ...
6 years, 2 months ago (2014-10-15 21:57:06 UTC) #5
Jim Stichnoth
https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone#newcode54 Makefile.standalone:54: ASSERTIONS := $(ASSERTIONS) -DNO_TEXT_ASM -DNO_DUMP -DNO_LLVM_CL Maybe name this ...
6 years, 2 months ago (2014-10-15 22:23:55 UTC) #6
Karl
https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone#newcode54 Makefile.standalone:54: ASSERTIONS := $(ASSERTIONS) -DNO_TEXT_ASM -DNO_DUMP -DNO_LLVM_CL On 2014/10/15 22:23:54, ...
6 years, 2 months ago (2014-10-16 16:51:49 UTC) #7
Jim Stichnoth
https://codereview.chromium.org/659513005/diff/60001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/60001/Makefile.standalone#newcode49 Makefile.standalone:49: BUILD_ATTS := $(BUILD_ATTS) debug I don't know if this ...
6 years, 2 months ago (2014-10-20 16:44:29 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone#newcode56 Makefile.standalone:56: BUILD_ATTS := $(BUILD_ATTS) minimal p2i On 2014/10/16 16:51:48, Karl ...
6 years, 2 months ago (2014-10-20 17:36:00 UTC) #9
Jim Stichnoth
https://codereview.chromium.org/659513005/diff/60001/tests_lit/lit.cfg File tests_lit/lit.cfg (right): https://codereview.chromium.org/659513005/diff/60001/tests_lit/lit.cfg#newcode79 tests_lit/lit.cfg:79: ifnm_atts_cmd = if_atts_cmd + ['--att=nonminal', '--command'] nonminimal
6 years, 2 months ago (2014-10-20 18:06:03 UTC) #10
Karl
https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone File Makefile.standalone (right): https://codereview.chromium.org/659513005/diff/40001/Makefile.standalone#newcode56 Makefile.standalone:56: BUILD_ATTS := $(BUILD_ATTS) minimal p2i On 2014/10/20 17:36:00, jvoung ...
6 years, 2 months ago (2014-10-20 21:00:43 UTC) #11
jvoung (off chromium)
Otherwise looks pretty good https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py File pydir/ifatts.py (right): https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py#newcode58 pydir/ifatts.py:58: main() On 2014/10/20 21:00:42, Karl ...
6 years, 2 months ago (2014-10-21 19:12:01 UTC) #12
Karl
Note: On tests that only used %lc2i, a removed the %iflc and added a corresponding ...
6 years, 2 months ago (2014-10-21 21:14:18 UTC) #13
Jim Stichnoth
https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py File pydir/ifatts.py (right): https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py#newcode18 pydir/ifatts.py:18: """Returns true if the set of names in Attributes ...
6 years, 2 months ago (2014-10-21 21:58:42 UTC) #14
Karl
https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py File pydir/ifatts.py (right): https://codereview.chromium.org/659513005/diff/60001/pydir/ifatts.py#newcode18 pydir/ifatts.py:18: """Returns true if the set of names in Attributes ...
6 years, 2 months ago (2014-10-22 17:03:36 UTC) #15
Jim Stichnoth
lgtm https://codereview.chromium.org/659513005/diff/160001/pydir/ifatts.py File pydir/ifatts.py (right): https://codereview.chromium.org/659513005/diff/160001/pydir/ifatts.py#newcode24 pydir/ifatts.py:24: """Run command only if attributes are defined. maybe ...
6 years, 2 months ago (2014-10-22 18:09:21 UTC) #16
jvoung (off chromium)
LGTM too https://codereview.chromium.org/659513005/diff/160001/tests_lit/llvm2ice_tests/phi.ll File tests_lit/llvm2ice_tests/phi.ll (right): https://codereview.chromium.org/659513005/diff/160001/tests_lit/llvm2ice_tests/phi.ll#newcode11 tests_lit/llvm2ice_tests/phi.ll:11: ; RUN: %lc2i -i %s --insts | ...
6 years, 2 months ago (2014-10-22 19:09:54 UTC) #17
Karl
Sent out for review because I updated Makefile to handle building subzero with toolchain_build_pnacl.py https://codereview.chromium.org/659513005/diff/160001/pydir/ifatts.py ...
6 years, 1 month ago (2014-10-27 21:24:22 UTC) #18
Jim Stichnoth
still lgtm https://codereview.chromium.org/659513005/diff/180001/Makefile File Makefile (right): https://codereview.chromium.org/659513005/diff/180001/Makefile#newcode15 Makefile:15: CXX.Flags += -std=c++11 -Wextra -Werror We shouldn't ...
6 years, 1 month ago (2014-10-27 21:33:09 UTC) #19
Karl
Committed patchset #11 (id:200001) manually as b262c5e0b110e63ec706213adf0af202274c442e (presubmit successful).
6 years, 1 month ago (2014-10-27 21:42:11 UTC) #20
Karl
6 years, 1 month ago (2014-10-27 21:42:28 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/659513005/diff/180001/Makefile
File Makefile (right):

https://codereview.chromium.org/659513005/diff/180001/Makefile#newcode15
Makefile:15: CXX.Flags += -std=c++11 -Wextra -Werror
On 2014/10/27 21:33:09, stichnot wrote:
> We shouldn't need -std=c++11 after the LLVM 3.5 merge, so either remove it or
> add a TODO to remove it, depending on whether you land this before or after
the
> merge.
> 
> And to be safe, maybe add -Wno-error=unused-parameter ?

Done.

Powered by Google App Engine
This is Rietveld 408576698