[all-commits] [llvm/llvm-project] 3531cc: [PromoteMem2Reg] Optimize memory usage in PromoteM...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Tue Jun 3 19:34:57 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3531cc1cc777af5ea198c17c62f7324779b707e4
https://github.com/llvm/llvm-project/commit/3531cc1cc777af5ea198c17c62f7324779b707e4
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2025-06-03 (Tue, 03 Jun 2025)
Changed paths:
M llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list