[PATCH] D97676: [DSE] Extending isOverwrite to support offsetted fully overlapping stores

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 13:27:08 PST 2021


nikic added a comment.

In D97676#2594791 <https://reviews.llvm.org/D97676#2594791>, @fvrmatteo wrote:

> Is there official documentation on how to submit/work on a patch based on other WIP patches?

You can add dependencies by clicking on "Edit Related Revisions" on the right. I've added the parent revision for you.



================
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);
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97676/new/

https://reviews.llvm.org/D97676



More information about the llvm-commits mailing list