| commit | f940dd48fef77e42eb32c988bb63802c35968d71 | [log] [tgz] |
|---|---|---|
| author | Tim Shen <timshen@google.com> | Fri Feb 19 12:19:34 2021 -0800 |
| committer | Copybara-Service <copybara-worker@google.com> | Fri Feb 26 22:20:25 2021 -0800 |
| tree | c31da519d12a4662a0e612feda5e3e1d5dfe0a90 | |
| parent | 6b676939657c1e0971b2898d5e3c424b62849309 [diff] |
Patch by @wecing (Chenguang Wang). The current getFoldedSizeOf() implementation uses naive recursion, which could be really slow when the input structure type is too complex. This issue was first brought up in http://llvm.org/bugs/show_bug.cgi?id=8281; this change fixes it by adding memoization. Differential Revision: https://reviews.llvm.org/D6594 GitOrigin-RevId: a0757d8ebdefa1c54896d70d2a04f68fc23f7916