[PATCH] D33142: [Polly][Simplify] Remove writes that are overwritten.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 11:28:56 PDT 2017


Meinersbur created this revision.
Meinersbur added a project: Polly.

Remove memory writes that are overwritten by later writes. This works for StoreInsts:

  store double 21.0, double* %A
  store double 42.0, double* %A

, scalar writes at the end of a statement and mixes of these.

Multiple writes can be the result of DeLICM, which might map multiple writes to the same location when it knows that these do no conflict (for instance because they write the same value). Such writes interfere with pattern-matched optimization such as gemm and may not get removed by other LLVM passes after code generation.


https://reviews.llvm.org/D33142

Files:
  lib/Transform/Simplify.cpp
  test/Simplify/overwritten.ll
  test/Simplify/overwritten_3store.ll
  test/Simplify/overwritten_implicit_and_explicit.ll
  test/Simplify/overwritten_implicit_and_explicit___%for---%return.jscop
  test/Simplify/overwritten_implicit_and_explicit___%for---%return.jscop.transformed
  test/Simplify/overwritten_loadbetween.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33142.98807.patch
Type: text/x-patch
Size: 14697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170512/78ca9a1e/attachment.bin>


More information about the llvm-commits mailing list