Fix maxLoopDepth computation in ScopInfo
authorDavid Peixotto <dpeixott@codeaurora.org>
Tue, 13 Jan 2015 18:31:55 +0000 (18:31 +0000)
committerDavid Peixotto <dpeixott@codeaurora.org>
Tue, 13 Jan 2015 18:31:55 +0000 (18:31 +0000)
commitdc0a11c21fd799c9c22d8f9d274171a31ba24140
tree2785700a0b143c65b1010ba4ef53e1241a8aa1f6
parent63fb9281092a475a5d77b52f041efb4d0aa2a26f
Fix maxLoopDepth computation in ScopInfo

The max loop depth was incorrectly computed for scops that contain a
block from a loop but do not contain the entire loop. We need to
check that the full loop is contained in the region when computing
the max loop depth.

These scops occur when a region containing an inner loop is expanded
to include some blocks from the outer loop, but it cannot be fully
expanded to contain the outer loop because the region containing the
outer loop is invalid.

Differential Revision: http://reviews.llvm.org/D6913

llvm-svn: 225812
polly/lib/Analysis/ScopInfo.cpp
polly/test/ScopInfo/max-loop-depth.ll [new file with mode: 0644]