[llvm-bugs] [Bug 28071] New: Assertion due to overlap of nonaffine and affine region

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 9 18:43:52 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28071

            Bug ID: 28071
           Summary: Assertion due to overlap of nonaffine and affine
                    region
           Product: Polly
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: huihuiz at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16501
  --> https://llvm.org/bugs/attachment.cgi?id=16501&action=edit
test

Below is the command that causes an assertion with attached test

opt  -polly-allow-nonaffine-loops -polly-process-unprofitable -analyze
-polly-scops affine_region_overlap_with_nonaffine_region.ll -S

Printing analysis 'Polly - Create polyhedral description of Scops' for region:
'for.body1.outer.us.us => for.inc1.us.us' in function 'func':
Invalid Scop!
opt: .../llvm/tools/polly/lib/Analysis/ScopInfo.cpp:4099: void
polly::Scop::buildSchedule(llvm::LoopInfo &): Assertion `LoopStack.size() == 1
&& LoopStack.back().L == L' failed.
#0 0x00000000011fc578 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(./bin/opt+0x11fc578)
#1 0x00000000011fa306 llvm::sys::RunSignalHandlers() (./bin/opt+0x11fa306)
#2 0x00000000011fccaa SignalHandler(int) (./bin/opt+0x11fccaa)
#3 0x00007f387e8aacb0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xfcb0)
#4 0x00007f387daf10d5 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x360d5)
#5 0x00007f387daf483b abort (/lib/x86_64-linux-gnu/libc.so.6+0x3983b)
#6 0x00007f387dae9d9e (/lib/x86_64-linux-gnu/libc.so.6+0x2ed9e)
#7 0x00007f387dae9e42 (/lib/x86_64-linux-gnu/libc.so.6+0x2ee42)
#8 0x00000000013a5b8f polly::Scop::buildSchedule(llvm::LoopInfo&)
(./bin/opt+0x13a5b8f)
#9 0x00000000013a50aa polly::Scop::init(llvm::AAResults&,
llvm::AssumptionCache&, llvm::DominatorTree&, llvm::LoopInfo&)
(./bin/opt+0x13a50aa)
#10 0x00000000013b03d6 polly::ScopBuilder::buildScop(llvm::Region&,
llvm::AssumptionCache&) (./bin/opt+0x13b03d6)
#11 0x00000000013b0626 polly::ScopBuilder::ScopBuilder(llvm::Region*,
llvm::AssumptionCache&, llvm::AAResults&, llvm::DataLayout const&,
llvm::DominatorTree&, llvm::LoopInfo&, polly::ScopDetection&,
llvm::ScalarEvolution&) (./bin/opt+0x13b0626)
#12 0x00000000013b0c84 polly::ScopInfoRegionPass::runOnRegion(llvm::Region*,
llvm::RGPassManager&) (./bin/opt+0x13b0c84)
#13 0x0000000000981e93 llvm::RGPassManager::runOnFunction(llvm::Function&)
(./bin/opt+0x981e93)
#14 0x0000000000d76a84 llvm::FPPassManager::runOnFunction(llvm::Function&)
(./bin/opt+0xd76a84)
#15 0x0000000000d76ccb llvm::FPPassManager::runOnModule(llvm::Module&)
(./bin/opt+0xd76ccb)
#16 0x0000000000d771f3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(./bin/opt+0xd771f3)
#17 0x00000000005d5cae main (./bin/opt+0x5d5cae)
#18 0x00007f387dadc76d __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2176d)
#19 0x00000000005c7c85 _start (./bin/opt+0x5c7c85)
Stack dump:

This test has the following flow:
       bb1(0)
      /     \
     bb2(1) bb3(2)
Where, bb3 is an infinite loop, bb1 and bb3 forms a nonaffine region; bb1
and bb2 is an affine loop, forms an affine region


The assertion is caused because the affine region of bb1 and bb2 overlapped
with nonaffine region bb1 and bb3, in this case, the affine region should be
given up by polly optimizer.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160610/7e3a8cd2/attachment.html>


More information about the llvm-bugs mailing list