[PATCH] D11854: DeadStoreElimination: remove a redundant store even if the load is in a different block.
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 18:28:24 PDT 2015
reames added inline comments.
================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:496
@@ -495,3 +495,1 @@
- // Ignore any store where we can't find a local dependence.
- // FIXME: cross-block DSE would be fun. :)
----------------
I think you'd be better to phrase the non-local query here so that it benefits both sub-optimizations.
================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:504
@@ +503,3 @@
+ Instruction *DepInst = InstDep.getInst();
+ if (!DepInst) {
+ // No dependency in the same block. Next try: see if we can get one
----------------
Phasing this is isNonLocal wouldbe much clearer.
http://reviews.llvm.org/D11854
More information about the llvm-commits
mailing list