[polly] r244606 - Revise the simplification of regions

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 00:53:14 PDT 2015


On 08/12/2015 09:44 AM, Michael Kruse wrote:
> 2015-08-12 9:19 GMT+02:00 Michael Kruse <llvm at meinersbur.de>:
>> I was also looking into solution number 2 since I was afraid 1) would
>> break more things that it would fix. But your patch works well for
>> pifft as well. Are you going to commit it? I will add a second test
>> case for the pifft case.
>
> Mixed up solution numbers:
> I was looking in solution number 1) since I was afraid the others
> would break more things than it would fix.
>
> However, I prefer your solution number 2). I am not that familiar with
> non-affine regions, but could the contains-check be removed entirely?

Are you talking about:

+    if (!R.contains(OpBB))
+      continue;

It can be removed, but it does not give us anything. What it ensures is
that we do not create IRAccesses for BasicBlocks outside of the scop's
region, as we ignore them later on anyhow. The important point is that
the following piece of code is executed for the PHI node:

  if (!OnlyNonAffineSubRegionOperands) {
      IRAccess ScalarAccess(IRAccess::READ, PHI, ZeroOffset, 1, true,
                            /* IsPHI */ true);
      Functions.push_back(std::make_pair(ScalarAccess, PHI));
}

Which it is as soon as we set OnlyNonAffineSubRegionOperands to false.

Best,
Tobias


More information about the llvm-commits mailing list