[FIX] Teach RegionGenerator to respect and update dominance
commit731a681138bdf3d84bfe048d1c22012759245ecb
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>
Fri, 27 Feb 2015 18:29:04 +0000 (27 18:29 +0000)
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>
Fri, 27 Feb 2015 18:29:04 +0000 (27 18:29 +0000)
tree1213f8776c2ab5945c3bd191a466d1bc05882e44
parent28c3afa88c7aaa7287106d303532f53cf4bb8d4c
[FIX] Teach RegionGenerator to respect and update dominance

  When we generate code for a whole region we have to respect dominance
  and update it too.
  The first is achieved with multiple "BBMap"s. Each copied block in the
  region gets its own map. It is initialized only with values mapped in
  the immediate dominator block, if this block is in the region and was
  therefor already copied. This way no values defined in a block that
  doesn't dominate the current one will be used.
  To update dominance information we check if the immediate dominator of
  the original block we want to copy is in the region. If so we set the
  immediate dominator of the current block to the copy of the immediate
  dominator of the original block.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@230774 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/CodeGen/BlockGenerators.h
lib/CodeGen/BlockGenerators.cpp
test/Isl/CodeGen/non-affine-subregion-dominance-reuse.ll [new file with mode: 0644]
test/Isl/CodeGen/non_affine_float_compare.ll