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

Issue 14495008: Create type IDs based on reference counts. (Closed)

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

Description

Create type IDs based on reference counts. Create type IDs based on number of references, rather than first reached. This is done so that fewer bits are used to encode types that are commonly used. Note that this cuts the size of the generate bitcode file by about 1.5%, with no effect on the reader, since it only changes the order type ID's are created. 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=1046c28

Patch Set 1 #

Total comments: 22

Patch Set 2 : #

Total comments: 13

Patch Set 3 : Fix issues raised and add test case. #

Patch Set 4 : Fix typo in comment. #

Total comments: 4

Patch Set 5 : More fixes. #

Total comments: 4

Patch Set 6 : Fix typo in struct-types.ll #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -11 lines) Patch
M lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp View 1 2 5 chunks +15 lines, -5 lines 0 comments Download
M lib/Bitcode/NaCl/Writer/NaClValueEnumerator.h View 1 2 3 chunks +11 lines, -1 line 0 comments Download
M lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp View 1 2 3 4 7 chunks +83 lines, -6 lines 0 comments Download
A + test/NaCl/Bitcode/lit.local.cfg View 1 2 3 4 0 chunks +-1 lines, --1 lines 0 comments Download
A test/NaCl/Bitcode/struct-types.ll View 1 2 3 4 5 1 chunk +78 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Karl
Please take a look at this CL. Thanks.
7 years, 7 months ago (2013-04-29 17:43:13 UTC) #1
jvoung (off chromium)
still looking through this... rough comments https://codereview.chromium.org/14495008/diff/1/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp File lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp (right): https://codereview.chromium.org/14495008/diff/1/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp#newcode36 lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp:36: TypeCountMap = new ...
7 years, 7 months ago (2013-04-29 18:35:42 UTC) #2
Derek Schuff
https://codereview.chromium.org/14495008/diff/1/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp File lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp (right): https://codereview.chromium.org/14495008/diff/1/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp#newcode151 lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp:151: EnumerateType(Type::getHalfTy(M->getContext())); half types are not allowed in the pnacl ...
7 years, 7 months ago (2013-04-29 19:38:42 UTC) #3
Karl
Also updated the dumping of types to use a VBR field if a large number ...
7 years, 7 months ago (2013-04-29 22:19:16 UTC) #4
Karl
Ping?
7 years, 7 months ago (2013-05-02 14:42:50 UTC) #5
Derek Schuff
https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp File lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp (right): https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp#newcode40 lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp:40: TypeCountMap = &count_map; it's weird having this extra pointer ...
7 years, 7 months ago (2013-05-02 15:41:45 UTC) #6
jvoung (off chromium)
https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp File lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp (right): https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp#newcode239 lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp:239: // a large number of types. What is a ...
7 years, 7 months ago (2013-05-02 16:35:40 UTC) #7
Karl
PTAL. I fixed issues brought up, and added an LLVM test to show that we ...
7 years, 7 months ago (2013-05-15 20:12:20 UTC) #8
jvoung (off chromium)
https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp File lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp (right): https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp#newcode239 lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp:239: // a large number of types. On 2013/05/15 20:12:20, ...
7 years, 7 months ago (2013-05-15 21:01:36 UTC) #9
Karl
PTAL. Thanks. https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp File lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp (right): https://codereview.chromium.org/14495008/diff/6001/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp#newcode146 lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp:146: EnumerateType(Type::getInt8Ty(M->getContext())); On 2013/05/15 21:01:36, jvoung (cr) wrote: ...
7 years, 7 months ago (2013-05-20 21:48:51 UTC) #10
jvoung (off chromium)
LGTM -- can you update the commit message about the primitive types too? https://codereview.chromium.org/14495008/diff/25001/test/NaCl/Bitcode/struct-types.ll File ...
7 years, 7 months ago (2013-05-20 22:39:36 UTC) #11
Karl
Fixed commit message and pushing. https://codereview.chromium.org/14495008/diff/25001/test/NaCl/Bitcode/struct-types.ll File test/NaCl/Bitcode/struct-types.ll (right): https://codereview.chromium.org/14495008/diff/25001/test/NaCl/Bitcode/struct-types.ll#newcode28 test/NaCl/Bitcode/struct-types.ll:28: ; i6 On 2013/05/20 ...
7 years, 7 months ago (2013-05-20 23:05:06 UTC) #12
Karl
7 years, 7 months ago (2013-05-20 23:05:44 UTC) #13
Message was sent while issue was closed.
Committed patchset #6 manually as r1046c28 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698