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

Issue 545623005: Add alloca instruction to Subzero bitcode reader. (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

Patch Set 1 #

Total comments: 9

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

Total comments: 7

Patch Set 3 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -0 lines) Patch
M src/PNaClTranslator.cpp View 1 2 2 chunks +30 lines, -0 lines 0 comments Download
A tests_lit/reader_tests/alloca.ll View 1 2 1 chunk +150 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
Karl
6 years, 3 months ago (2014-09-05 16:06:04 UTC) #2
jvoung (off chromium)
https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp#newcode1515 src/PNaClTranslator.cpp:1515: if (!isValidRecordSize(2, "function block alloca")) return; return on separate ...
6 years, 3 months ago (2014-09-05 16:55:04 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp#newcode1526 src/PNaClTranslator.cpp:1526: Inst = Ice::InstAlloca::create(Func, ByteCount, (1 << Align) >> 1, ...
6 years, 3 months ago (2014-09-05 23:03:39 UTC) #4
Karl
https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/545623005/diff/1/src/PNaClTranslator.cpp#newcode1515 src/PNaClTranslator.cpp:1515: if (!isValidRecordSize(2, "function block alloca")) return; On 2014/09/05 16:55:04, ...
6 years, 3 months ago (2014-09-08 21:16:23 UTC) #5
jvoung (off chromium)
Otherwise LGTM https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp#newcode1535 src/PNaClTranslator.cpp:1535: Alignment = (1 << static_cast<unsigned>(AlignPower)) >> 1; ...
6 years, 3 months ago (2014-09-08 23:31:23 UTC) #6
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp#newcode1535 src/PNaClTranslator.cpp:1535: Alignment = (1 << static_cast<unsigned>(AlignPower)) >> 1; ...
6 years, 3 months ago (2014-09-08 23:54:41 UTC) #7
Karl
Committed patchset #3 (id:40001) manually as 742d72d (presubmit successful).
6 years, 3 months ago (2014-09-09 18:40:17 UTC) #8
Karl
6 years, 3 months ago (2014-09-10 17:29:59 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp
File src/PNaClTranslator.cpp (right):

https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp#...
src/PNaClTranslator.cpp:1535: Alignment = (1 <<
static_cast<unsigned>(AlignPower)) >> 1;
On 2014/09/08 23:31:23, jvoung wrote:
> Isn't AlignPower already "unsigned" (cast was originally around Values[1])

Actually, I meant to make AlignPower uint64_t. Otherwise, it could contain a
VERY large number that would get lost in the (implicit) cast.
Changing tyep of AlignPower to uint64_t.

https://codereview.chromium.org/545623005/diff/20001/src/PNaClTranslator.cpp#...
src/PNaClTranslator.cpp:1535: Alignment = (1 <<
static_cast<unsigned>(AlignPower)) >> 1;
On 2014/09/08 23:54:40, stichnot wrote:
> static_cast<> is unnecessary.

See other comment for line.

https://codereview.chromium.org/545623005/diff/20001/tests_lit/reader_tests/a...
File tests_lit/reader_tests/alloca.ll (right):

https://codereview.chromium.org/545623005/diff/20001/tests_lit/reader_tests/a...
tests_lit/reader_tests/alloca.ll:15: ; CHECK:      __0:
On 2014/09/08 23:54:40, stichnot wrote:
> On 2014/09/08 23:31:23, jvoung wrote:
> > Hmm, most of the tests do "CHECK-LABEL: function_name", instead of CHECK:
> __0:,
> > so this seems a little unusual. Why not use the function_name instead for
> > consistency? Because of the CHECK-NEXT setup?
> 
> I think CHECK-LABEL is only appropriate for emitted code, but this is testing
> just the bitcode dump.
> 
> Along those lines, it's better to put a named "entry:" label in the entry
basic
> block if you eventually want to use szdiff.py, but I suspect that labels
aren't
> yet supported.

Since we aren't handling valuesymtab blocks within functions yet, we can't give
them a good name.

Powered by Google App Engine
This is Rietveld 408576698