[PATCH] D35611: [opt-viewer] Reduce memory consumption by another 20-25%
Brian Gesiak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 14:02:28 PDT 2017
modocache accepted this revision.
modocache added inline comments.
This revision is now accepted and ready to land.
================
Comment at: tools/opt-viewer/optrecord.py:69
+ # small dict. Two, using tuple instead of list allows Args to be directly
+ # used as part of the key (in Python only immutable types are hashable).
+ def _reduce_memory(self):
----------------
Great comment, thanks!
================
Comment at: tools/opt-viewer/optrecord.py:84
elif type(v) is dict:
- v = _intern_dict(v)
+ # This handels [{'Caller': ..., 'DebugLoc': { 'File': ... }}]
+ v = _reduce_memory_dict(v)
----------------
Typo: `s/handels/handles/g`.
https://reviews.llvm.org/D35611
More information about the llvm-commits
mailing list