[PATCH] D75462: [mem2reg] Enhance to ignore @llvm.assume(icmp ne null) uses.
Richard Diamond via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 12:58:05 PDT 2020
DiamondLovesYou added a comment.
In D75462#1902205 <https://reviews.llvm.org/D75462#1902205>, @jdoerfert wrote:
> While I see how this is generally useful, I fear the implementation goes in the wrong direction.
> What I mean is that we are moving away from instruction-based encodings for assume, see for example D74209 <https://reviews.llvm.org/D74209>.
> What we need here is basically D73832 <https://reviews.llvm.org/D73832>.
>
> @Tyker @lebedev.ri Maybe lifetime markers are the second use case for the "drop users" interface (D73404 <https://reviews.llvm.org/D73404>).
Interesting. I see your point, and I agree. Perhaps accept this until that lands, then revert this (or just leave inplace until -mem2reg is deleted? If that's the long term plan?)? I also have another patch similar to this which ignores alignment assumptions, FYI. These missed optimizations are very expensive for a target like AMDGPU because of unnecessary stack usage.
Sadly, my use case is for Rust, which ATM is a bit behind LLVM's release cadence (they are currently on a patched 9.0; see https://github.com/rust-lang/rust/pull/67759). So, at the very least I'll have to keep this patch local until that work lands and Rust is upgraded.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75462/new/
https://reviews.llvm.org/D75462
More information about the llvm-commits
mailing list