llvm-project
3531cc1c - [PromoteMem2Reg] Optimize memory usage in PromoteMem2Reg (#142474)

Commit
235 days ago
[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
Author
Parents
Loading