[PATCH] D13762: [Polly] Ensure unique implicit reads/writes at beginning/end of ScopStmts

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 19:43:19 PDT 2015


Meinersbur created this revision.
Meinersbur added reviewers: grosser, jdoerfert.
Meinersbur added subscribers: llvm-commits, pollydev.
Meinersbur added a project: Polly.

Previously, there could be a read scalar access for every use of a cross-stmt value and potentially multiple stores for a value definition. Check that such MemoryAccesses do not already exist before adding new ones. This will be used for De-LICM such that if removing a redundant read or write, there is no second variant left.

Instead of checking for each instruction individually whether it needs to be written, we can now "pull-in" a reload when required including the creation of a store of the definition which simplifies the creation of implicit MemoryAccesses a bit.

We also unify the PHI writes in non-affine subregions. Instead of writing them in the exiting block, we write them only in the subregion's exit. The former violates the requirement that implicits are not written until leaving the scop statement if the exiting block has also edges back into the subregion. In addition, generateScalarLoads and generateScalarStore do not have special versions for non-affine subregions anymore.

http://reviews.llvm.org/D13762

Files:
  include/polly/CodeGen/BlockGenerators.h
  include/polly/ScopInfo.h
  lib/Analysis/ScopInfo.cpp
  lib/CodeGen/BlockGenerators.cpp
  test/DependenceInfo/different_schedule_dimensions.ll
  test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll
  test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll
  test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_2.ll
  test/ScopInfo/NonAffine/non-affine-loop-condition-dependent-access_3.ll
  test/ScopInfo/NonAffine/non_affine_loop_used_later.ll
  test/ScopInfo/many-scalar-dependences.ll
  test/ScopInfo/non_affine_region_2.ll
  test/ScopInfo/non_affine_region_3.ll
  test/ScopInfo/non_affine_region_4.ll
  test/ScopInfo/phi_condition_modeling_2.ll
  test/ScopInfo/phi_loop_carried_float.ll
  test/ScopInfo/phi_scalar_simple_1.ll
  test/ScopInfo/phi_scalar_simple_2.ll
  test/ScopInfo/read-only-scalar-used-in-phi.ll
  test/ScopInfo/scalar.ll
  test/ScopInfo/tempscop-printing.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13762.37440.patch
Type: text/x-patch
Size: 51419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151015/82b22f35/attachment.bin>


More information about the llvm-commits mailing list