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

Issue 14813032: Make abbreviations explicit in pnacl-freeze/thaw. (Closed)

Created:
7 years, 7 months ago by Karl
Modified:
7 years, 7 months ago
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/pnacl-llvm.git@master
Visibility:
Public.

Description

Make abbreviations explicit in pnacl-freeze/thaw. [1] Explicitly enumerate all abbreviation values, including the maximum abbreviation for each type of block. [2] Make "enter subblock" calculate number of bits needed by passing in maximum abbreviation (associated with block) rather than requiring the developer to compute this value every time a subblock is entered. *NOTE* This code changes encoding sizes to be based on the maximum allowed value, rather than requiring the developer to calculate out the number of bits needed. This change doesn't make the PNaCL bitcode files incompatable with LLVM bitcode files, since it does not effect the bitcode reader. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3405 R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-llvm.git;a=commit;h=80b7ba7

Patch Set 1 #

Patch Set 2 : Fix typos in CL #

Total comments: 46

Patch Set 3 : Move abbreviations to global level and factor out code. #

Patch Set 4 : Remove dead code. #

Total comments: 33

Patch Set 5 : Fix code based on Jan's suggestions. #

Total comments: 17

Patch Set 6 : Fix issues raised by Jan. #

Patch Set 7 : Add more brief comments. #

Total comments: 6

Patch Set 8 : Small cleanups suggested by Jan in CL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+333 lines, -115 lines) Patch
M include/llvm/Bitcode/NaCl/NaClBitCodes.h View 1 2 3 4 5 6 3 chunks +69 lines, -1 line 0 comments Download
M include/llvm/Bitcode/NaCl/NaClBitstreamReader.h View 1 2 3 4 5 7 chunks +9 lines, -11 lines 0 comments Download
M include/llvm/Bitcode/NaCl/NaClBitstreamWriter.h View 1 2 3 4 5 6 7 10 chunks +48 lines, -11 lines 0 comments Download
M lib/Bitcode/NaCl/Reader/NaClBitcodeReader.h View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp View 1 2 3 4 30 chunks +44 lines, -18 lines 0 comments Download
M lib/Bitcode/NaCl/Reader/NaClBitstreamReader.cpp View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp View 1 2 3 4 5 6 7 37 chunks +151 lines, -69 lines 0 comments Download
M tools/pnacl-bcanalyzer/pnacl-bcanalyzer.cpp View 1 2 6 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Karl
PTAL. Thanks.
7 years, 7 months ago (2013-05-14 21:39:49 UTC) #1
jvoung (off chromium)
Still looking through, and trying to understand the change, but here are some comments. https://codereview.chromium.org/14813032/diff/2001/include/llvm/Bitcode/NaCl/NaClBitCodes.h ...
7 years, 7 months ago (2013-05-14 23:47:13 UTC) #2
Karl
PTAL. Thanks. https://codereview.chromium.org/14813032/diff/2001/include/llvm/Bitcode/NaCl/NaClBitCodes.h File include/llvm/Bitcode/NaCl/NaClBitCodes.h (right): https://codereview.chromium.org/14813032/diff/2001/include/llvm/Bitcode/NaCl/NaClBitCodes.h#newcode23 include/llvm/Bitcode/NaCl/NaClBitCodes.h:23: #include "llvm/Support/ErrorHandling.h" Added '#include "llvm/Support/MathExtras.h" so that ...
7 years, 7 months ago (2013-05-17 20:52:18 UTC) #3
jvoung (off chromium)
https://codereview.chromium.org/14813032/diff/16001/include/llvm/Bitcode/NaCl/NaClBitCodes.h File include/llvm/Bitcode/NaCl/NaClBitCodes.h (left): https://codereview.chromium.org/14813032/diff/16001/include/llvm/Bitcode/NaCl/NaClBitCodes.h#oldcode20 include/llvm/Bitcode/NaCl/NaClBitCodes.h:20: Leave this newline in between the ifndef and the ...
7 years, 7 months ago (2013-05-17 23:40:48 UTC) #4
Karl
PTAL. Thanks. https://codereview.chromium.org/14813032/diff/16001/include/llvm/Bitcode/NaCl/NaClBitCodes.h File include/llvm/Bitcode/NaCl/NaClBitCodes.h (left): https://codereview.chromium.org/14813032/diff/16001/include/llvm/Bitcode/NaCl/NaClBitCodes.h#oldcode20 include/llvm/Bitcode/NaCl/NaClBitCodes.h:20: On 2013/05/17 23:40:48, jvoung (cr) wrote: > ...
7 years, 7 months ago (2013-05-20 22:59:20 UTC) #5
jvoung (off chromium)
Not quite sure about the metadata string part, I'll make another pass to see if ...
7 years, 7 months ago (2013-05-21 17:24:16 UTC) #6
Karl
PTAL. Thanks. https://codereview.chromium.org/14813032/diff/27001/include/llvm/Bitcode/NaCl/NaClBitCodes.h File include/llvm/Bitcode/NaCl/NaClBitCodes.h (right): https://codereview.chromium.org/14813032/diff/27001/include/llvm/Bitcode/NaCl/NaClBitCodes.h#newcode218 include/llvm/Bitcode/NaCl/NaClBitCodes.h:218: // decodeSignRotatedValue - Decode a signed value ...
7 years, 7 months ago (2013-05-21 23:06:52 UTC) #7
jvoung (off chromium)
LGTM https://codereview.chromium.org/14813032/diff/27001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp File lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp (right): https://codereview.chromium.org/14813032/diff/27001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp#newcode694 lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp:694: METADATA_MAX_ABBREV); On 2013/05/21 23:06:52, Karl wrote: > On ...
7 years, 7 months ago (2013-05-21 23:56:45 UTC) #8
Karl
Committed patchset #8 manually as r80b7ba7 (presubmit successful).
7 years, 7 months ago (2013-05-24 16:55:13 UTC) #9
Karl
https://codereview.chromium.org/14813032/diff/42001/include/llvm/Bitcode/NaCl/NaClBitstreamWriter.h File include/llvm/Bitcode/NaCl/NaClBitstreamWriter.h (right): https://codereview.chromium.org/14813032/diff/42001/include/llvm/Bitcode/NaCl/NaClBitstreamWriter.h#newcode263 include/llvm/Bitcode/NaCl/NaClBitstreamWriter.h:263: /// (global) BlockInfo entries defined for the block. On ...
7 years, 7 months ago (2013-05-24 16:55:33 UTC) #10
Mark Seaborn
This change appears to cause a test failure: ******************** TEST 'LLVM :: NaCl/Bitcode/struct-types.ll' FAILED ******************** ...
7 years, 7 months ago (2013-05-24 19:03:48 UTC) #11
Mark Seaborn
7 years, 7 months ago (2013-05-24 19:20:37 UTC) #12
On 24 May 2013 12:03, <mseaborn@chromium.org> wrote:

> This change appears to cause a test failure:
>
> ******************** TEST 'LLVM :: NaCl/Bitcode/struct-types.ll' FAILED
> ********************
> ...
> Malformed block record
> /home/mseaborn/devel/nacl-**git3/native_client/pnacl/git/**
> llvm/test/NaCl/Bitcode/struct-**types.ll:53:10:
> error: expected string not found in input
> ; PNACL: <TYPE_BLOCK_ID {{.*}}>
>          ^
> <stdin>:1:1: note: scanning from here
> <MODULE_BLOCK NumWords=97 BlockCodeSize=1>
> ^
> <stdin>:1:3: note: possible intended match here
> <MODULE_BLOCK NumWords=97 BlockCodeSize=1>
>

My mistake!  I was rebuilding with "ONLY_TOOLS=opt pnacl-abicheck
pnacl-freeze" before running the tests.  Rebuilding all the targets makes
the tests pass.  Silly me.

Mark

-- 
You received this message because you are subscribed to the Google Groups
"Native-Client-Reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to native-client-reviews+unsubscribe@googlegroups.com.
To post to this group, send email to native-client-reviews@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-reviews?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Powered by Google App Engine
This is Rietveld 408576698