Slight variant of D105098 which also returns OW_None on NoAlias.
Details
- Reviewers
- None
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is not really intended for commit, just to make it easy to apply/test the follow-up changes.
Let's work on getting the original D105098 in.
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1012 | I originally had the check just after getting AAR, but isOverwrite considers out-of-bounds writes killing other writes to the same underlying object, which would be missed by the early exit. |
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1012 | Could you clarify which particular piece of code handles "out-of-bounds" case? |
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1012 | It is not handled explicitly and is a consequence of the code just below (lines 1017-1020). If the underlying object size matches the size of the out-of-bounds store, the out of bounds store is considered killing other stores to the same object. Note that this logic does not kick in, if the out-of-bounds store is smaller than the underlying object. I added such a test case in 9c00afe926e9 |
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp | ||
---|---|---|
1012 | That sounds great, thanks! |
I'm totally fine if you commit changes by yourself. I will be able to get to it early next week only.
PS: I had a very busy week and didn't have chance to work on that. Sorry...
Maybe move this check to the start?