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

Issue 567703003: Allow ability to name unnamed global addresses in 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

Allow ability to name unnamed global addresses in Subzero. This is a workaround for issue that Subzero currently assumes all global addresses have a name, but finalized pexe files leave most global addresses unnamed. It does this by allowing two optional command-line flag name prefixes that are used to generate names for unnamed global addresses. BUG= None R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=5ee234a

Patch Set 1 #

Patch Set 2 : Add tests #

Total comments: 11

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

Patch Set 4 : Fix nits. #

Total comments: 13

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -6 lines) Patch
M src/IceClFlags.h View 1 2 3 1 chunk +7 lines, -1 line 0 comments Download
M src/IceConverter.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M src/IceTranslator.h View 2 chunks +9 lines, -0 lines 0 comments Download
M src/IceTranslator.cpp View 1 2 3 4 3 chunks +49 lines, -3 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M src/llvm2ice.cpp View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download
A tests_lit/llvm2ice_tests/unnamed.ll View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A tests_lit/reader_tests/unnamed.ll View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Karl
6 years, 3 months ago (2014-09-11 21:14:04 UTC) #2
Jim Stichnoth
https://codereview.chromium.org/567703003/diff/20001/src/IceClFlags.h File src/IceClFlags.h (right): https://codereview.chromium.org/567703003/diff/20001/src/IceClFlags.h#newcode32 src/IceClFlags.h:32: std::string DefaultGlobalPrefix; 1. I originally thought ClFlags was just ...
6 years, 3 months ago (2014-09-11 22:08:19 UTC) #3
jvoung (off chromium)
Thanks, but one question -- https://codereview.chromium.org/567703003/diff/20001/src/llvm2ice.cpp File src/llvm2ice.cpp (right): https://codereview.chromium.org/567703003/diff/20001/src/llvm2ice.cpp#newcode116 src/llvm2ice.cpp:116: cl::init("")); Should this have ...
6 years, 3 months ago (2014-09-11 22:16:43 UTC) #4
Karl
https://codereview.chromium.org/567703003/diff/20001/src/IceClFlags.h File src/IceClFlags.h (right): https://codereview.chromium.org/567703003/diff/20001/src/IceClFlags.h#newcode32 src/IceClFlags.h:32: std::string DefaultGlobalPrefix; On 2014/09/11 22:08:19, stichnot wrote: > 1. ...
6 years, 3 months ago (2014-09-12 16:29:06 UTC) #5
Jim Stichnoth
LGTM with some nits. You should tweak the commit message since there are now two ...
6 years, 3 months ago (2014-09-12 17:20:09 UTC) #6
Karl
Committed patchset #5 (id:80001) manually as 5ee234a (presubmit successful).
6 years, 3 months ago (2014-09-12 17:41:48 UTC) #7
Karl
6 years, 3 months ago (2014-09-12 17:41:59 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp
File src/IceTranslator.cpp (right):

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:30: static inline void setValueName(llvm::Value *V, const
char *Kind,
On 2014/09/12 17:20:09, stichnot wrote:
> Don't use static.  And can you omit inline?

Done.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:31: const std::string &Prefix, uint32_t &NameIndex,
On 2014/09/12 17:20:09, stichnot wrote:
> IceString

Done.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:32: Ice::Ostream &errs) {
On 2014/09/12 17:20:09, stichnot wrote:
> Remove Ice:: everywhere in this file (or maybe better, remove "using namespace
> Ice;").

Done.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:40: }
Added check if NameIndex == 0, then use prefix as name instead so that we are
more like pnacl-llc.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:47: }
On 2014/09/12 17:20:09, stichnot wrote:
> // end of anonymous namespace

Done.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:50: const std::string &GlobalPrefix =
Flags.DefaultGlobalPrefix;
On 2014/09/12 17:20:09, stichnot wrote:
> IceString

Done.

https://codereview.chromium.org/567703003/diff/60001/src/IceTranslator.cpp#ne...
src/IceTranslator.cpp:60: const std::string &FunctionPrefix =
Flags.DefaultFunctionPrefix;
On 2014/09/12 17:20:09, stichnot wrote:
> IceString

Done.

Powered by Google App Engine
This is Rietveld 408576698