[PATCH] D97676: [DSE] Extending isOverwrite to support offsetted fully overlapping stores
Matteo Favaro via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 01:23:18 PST 2021
fvrmatteo marked an inline comment as done.
fvrmatteo added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:475
+ // If we hit a partial alias we may have a full overwrite
+ if (AA.alias(Later, Earlier) == AliasResult::PartialAlias) {
+ int64_t Off = AA.getClobberOffset(Later, Earlier).getValueOr(0);
----------------
nikic wrote:
> You are performing two queries here, one in AA.isMustAlias above and another here. While caching mitigates some of the cost, it's better to only call AA.alias() and then check if the result is MustAlias/PartialAlias.
Thanks, I completely overlooked it!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97676/new/
https://reviews.llvm.org/D97676
More information about the llvm-commits
mailing list