DescriptionSubzero: Tweaks to reduce malloc use.
1. Subzero constructs many strings based in part on function name. When function names are not present (as in properly finalized pexes), they are synthesized as something like "Function12345". We can shorten these strings to e.g. "F12345" by using --default-function-prefix=F . Similar for global variable names.
Using short strings makes it much less likely to have to use malloc. As such, we force that to be the default in the browser translator build. For perf-testing the command-line version, the user can just add the option manually for now.
Ultimately, we should avoid use of strings in this way.
2. The register allocator uses a few instances of llvm::SmallVector that are sized too small and therefore end up using malloc. This can be fixed in a clean way, and there is a TODO for it, but in the meantime we just bump the size.
BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4360
R=jpp@chromium.org
Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=843142fe0c5913df2391f9ac4608a02c038953cb
Patch Set 1 #
Total comments: 2
Messages
Total messages: 7 (3 generated)
|