[PATCH] D13487: [Polly] Load/Store scalar accesses before/after the statement itself

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 16:40:42 PDT 2015


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

Instead of generating implicit loads within basic blocks, put them before the instructions of the statment itself, including non-affine subregions. The region's entry node is dominating all blocks in the region and therefore the loaded value will be available there. Replace the per-BB RegionMap by a flat ValueMap. The former was unecessary because we are iterating through the blocks of the non-affine subregion in a topological order of the dominator tree.

Implicit writes in block-stmts were already stored back at the end of the block. Now, also generate the stores of non-affine subregions when leaving the statement, i.e. in the exiting block.

This change is required for array-mapped implicits ("De-LICM") to ensure that there are no dependencies of demoted scalars within statments. Statement load all required values, operator on copied in registers, and then write back the changed value to the demoted memory. Lifetimes analysis within statements becomes unecessary.

http://reviews.llvm.org/D13487

Files:
  include/polly/CodeGen/BlockGenerators.h
  include/polly/ScopInfo.h
  lib/CodeGen/BlockGenerators.cpp
  test/Isl/CodeGen/non-affine-phi-node-expansion-2.ll
  test/Isl/CodeGen/non-affine-phi-node-expansion-3.ll
  test/Isl/CodeGen/phi_loop_carried_float.ll
  test/Isl/CodeGen/phi_loop_carried_float_escape.ll
  test/Isl/CodeGen/read-only-scalars.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13487.36675.patch
Type: text/x-patch
Size: 20254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151006/8f93c8bf/attachment.bin>


More information about the llvm-commits mailing list