This patch adds support for eliminating stores by free & lifetime.end
calls. We can remove stores that are not read before calling a memory
terminator and we can eliminate all stores after a memory terminator
until we see a new lifetime.start. The second case seems to not really
trigger much in practice though.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1705 | I'm not sure how expensive the isFreeCall is, but the check is already done inside the call to getLocForTerminator. You could add a bool optional, or return a pair, if worth eliminating the repeated check. | |
2268 | I don't understand how this change is related. |
Comment Actions
Addressed comments, thanks! I updated getLocForTerminator to return an optional pair and removed the unnecessary ToCheck.insert calls.
I'm not sure how expensive the isFreeCall is, but the check is already done inside the call to getLocForTerminator. You could add a bool optional, or return a pair, if worth eliminating the repeated check.