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

Issue 577703002: Add unreachable instruction to Subzero. (Closed)

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

Description

Add unreachable instruction to Subzero. Also fixes error messages on instruction operands, to print out the operand (rather than pointer to it), since we can now print out operands. BUG= https://code.google.com/p/nativeclient/issues/detail?id=389 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=97501839d2dd8210723d132e6555a69d0c297dc7

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -12 lines) Patch
M src/IceOperand.h View 1 chunk +6 lines, -0 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 11 chunks +31 lines, -12 lines 0 comments Download
A tests_lit/reader_tests/unreachable.ll View 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Karl
6 years, 3 months ago (2014-09-16 18:20:11 UTC) #2
Jim Stichnoth
LGTM with a few nits. https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp#newcode1427 src/PNaClTranslator.cpp:1427: << "not allowed for ...
6 years, 3 months ago (2014-09-16 20:16:31 UTC) #3
Karl
Committed patchset #2 (id:20001) manually as 9750183 (tree was closed).
6 years, 3 months ago (2014-09-16 20:35:40 UTC) #4
Karl
6 years, 3 months ago (2014-09-16 20:35:55 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp
File src/PNaClTranslator.cpp (right):

https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp#newc...
src/PNaClTranslator.cpp:1427: << "not allowed for values of type " << ThenType;
On 2014/09/16 20:16:31, stichnot wrote:
> Did you mean to delete the space before 'not'?

Yes. Added.

https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp#newc...
src/PNaClTranslator.cpp:1595: StrBuf << "Branch condition " << *Cond << " not
i1";
On 2014/09/16 20:16:31, stichnot wrote:
> Print the actual operand type as well as the operand, like all the changes
> above?

Done.

https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp#newc...
src/PNaClTranslator.cpp:1635: << " in phi instruction";
On 2014/09/16 20:16:31, stichnot wrote:
> Print actual operand type?

Done.

https://codereview.chromium.org/577703002/diff/1/src/PNaClTranslator.cpp#newc...
src/PNaClTranslator.cpp:1679: case naclbitc::FUNC_CODE_INST_UNREACHABLE: {
On 2014/09/16 20:16:31, stichnot wrote:
> Would you mind explicitly enumerating all the currently unhandled cases? 
E.g.:
> 
>   case naclbitc::FOO:
>   case naclbitc::BAR:
>     ErrorMessage(); break;
> 
> This would be a big help in seeing how much is left to implement.

Done.

https://codereview.chromium.org/577703002/diff/1/tests_lit/reader_tests/unrea...
File tests_lit/reader_tests/unreachable.ll (right):

https://codereview.chromium.org/577703002/diff/1/tests_lit/reader_tests/unrea...
tests_lit/reader_tests/unreachable.ll:18: %div = sdiv i32 %num, %den
On 2014/09/16 20:16:31, stichnot wrote:
> If you're testing for exceptional conditions, also check for %num=MININT and
> %den=-1.
> 
> (just kidding)

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698