[PATCH] D105545: [MergedLoadStoreMotion] Conditional store elimination

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 22 10:51:49 PDT 2021


efriedma added a comment.

At a high level, I think this needs some heuristic to drive it.  I can see this being profitable under two circumstances, broadly speaking:

1. Sinking the store enables DSE to eliminate an earlier store.
2. Sinking the store enables vectorization.

Otherwise, you're just performing extra memory operations, which doesn't seem like an improvement.



================
Comment at: llvm/test/Other/opt-O3-pipeline.ll:144
 ; CHECK-NEXT:         Function Alias Analysis Results
+; CHECK-NEXT:         Memory SSA
 ; CHECK-NEXT:         MergedLoadStoreMotion
----------------
We don't want an additional MemorySSA run, if we can avoid it.

If we're going to do this, maybe stick the code into Dead Store Elimination?


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

https://reviews.llvm.org/D105545



More information about the llvm-commits mailing list