diff options
author | Vitaly Buka <vitalybuka@google.com> | 2025-06-03 19:34:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 19:34:36 -0700 |
commit | 3531cc1cc777af5ea198c17c62f7324779b707e4 (patch) | |
tree | fe137f8c27eb524b00c56f541bfc6bf44edc7f67 /clang/lib/CodeGen | |
parent | 6760857bf3ad82a44c56d45a6a88a21b3fe521be (diff) | |
download | llvm-3531cc1cc777af5ea198c17c62f7324779b707e4.zip llvm-3531cc1cc777af5ea198c17c62f7324779b707e4.tar.gz llvm-3531cc1cc777af5ea198c17c62f7324779b707e4.tar.bz2 |
[PromoteMem2Reg] Optimize memory usage in PromoteMem2Reg (#142474)
When BasicBlock has a large number of allocas, and
successors, we had to copy entire IncomingVals and
IncomingLocs vectors for successors.
Also updates to IncomingVals and
IncomingLocs are infrequent (only Load/Store into
alloca affect arrays).
Given the nature of DFS traversal, instead of copying
the entire vector, we can keep track of the changes
and undo all changes done by successors.
Fixes #142461
On the attached to issue #142461 IR RSS drops from 35Gb to 1.8Gb.
But it does not affect compile time on average
https://llvm-compile-time-tracker.com/compare.php?from=2e98ed8caa0b47ee79af4ad24b5436a89fe49dfa&to=effac6d1fd600e544f8bc21382c7e541973b1378&stat=instructions:u
Diffstat (limited to 'clang/lib/CodeGen')
0 files changed, 0 insertions, 0 deletions