[DSE] Add support for not aligned begin/end
authorEvgeniy Brevnov <ybrevnov@azul.com>
Fri, 4 Dec 2020 09:57:35 +0000 (16:57 +0700)
committerEvgeniy Brevnov <ybrevnov@azul.com>
Thu, 4 Mar 2021 05:24:23 +0000 (12:24 +0700)
commite94125f054310ea4a6559f9b2fa3f1896c1ba48a
treebaf759f54ea15220af4625d7fb5825cbe0a22934
parent21427b8eb8e773789bdb4cd8911bee6631910a37
[DSE] Add support for not aligned begin/end

This is an attempt to improve handling of partial overlaps in case of unaligned begin\end.

Existing implementation just bails out if it encounters such cases. Even when it doesn't I believe existing code checking alignment constraints is not quite correct. It tries to ensure alignment of the "later" start/end offset while should be preserving relative alignment between earlier and later start/end.

The idea behind the change is simple. When start/end is not aligned as we wish instead of bailing out let's adjust it as necessary to get desired alignment.

I'll update with performance results as measured by the test-suite...it's still running...

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D93530
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/test/Transforms/DeadStoreElimination/MSSA/OverwriteStoreBegin.ll
llvm/test/Transforms/DeadStoreElimination/MSSA/OverwriteStoreEnd.ll
llvm/test/Transforms/DeadStoreElimination/MemDepAnalysis/OverwriteStoreBegin.ll