[PATCH] D95763: [MemorySSA] Don't treat lifetime.end as NoAlias
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 14:00:35 PST 2021
asbirlea added a comment.
I'm not familiar with the original reasoning, so here are some thoughts.
The test that's updated doesn't make sense to me as it was done originally. The load access for `P` after a `lifetime.end` is strange.
Where I'd see this being useful is in loop optimizations, for temporaries declared inside a loop. Going around the loop to determine if an access can be hoisted/sunk, would need to bypass the lifetime marker, otherwise the clobbering access would remain the phi. But then any loop transformation using this information to take the access out of the loop, would need to also consider the lifetime markers found inside the loop and move or remove them. It's possible this is already happening right now and the lifetime markers are removed as being dead code, and that's why we haven't encountered the issue.
So, while I think MSSA's special handling on its own makes sense, I don't think any transformation currently uses this in a proper way.
I'm running some testing to check if this impacts optimizations in a meaningful way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95763/new/
https://reviews.llvm.org/D95763
More information about the llvm-commits
mailing list