[llvm-bugs] [Bug 33208] New: Polly-ACC: Loop without a header.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 29 10:37:48 PDT 2017


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

            Bug ID: 33208
           Summary: Polly-ACC: Loop without a header.
           Product: Polly
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Optimizer
          Assignee: polly-dev at googlegroups.com
          Reporter: llvm at meinersbur.de
                CC: llvm-bugs at lists.llvm.org

During code generation, Polly-ACC removes all blocks from some loops
(GPUNodeBuilder::clearLoops). That is, the loops don't even have a header
anymore, which is assumed by ScalarEvolution. ScalarEvolution calls
Loop::getHeader() on such a loops, returning an uninitialized/undefined
pointer.

This happens on 4 different Polly-ACC regression tests, one shown below. Polly
r304151.

Found using msvc's debug STL.




  ********************
  FAIL: Polly :: GPGPU/shared-memory-two-dimensional.ll (111 of 929)
  ******************** TEST 'Polly :: GPGPU/shared-memory-two-dimensional.ll'
FAILED ********************
  Script:
  --
  opt  -polly-process-unprofitable  -polly-remarks-minimal 
-polly-use-llvm-names  -polly-codegen-ppcg -polly-acc-dump-code 
-polly-acc-use-shared  -disable-output < C:\Users\Meinersbur\src\llvm\tool
  s\polly\test\GPGPU\shared-memory-two-dimensional.ll |  FileCheck
-check-prefix=CODE
C:\Users\Meinersbur\src\llvm\tools\polly\test\GPGPU\shared-memory-two-dimensional.ll
  opt  -polly-process-unprofitable  -polly-remarks-minimal 
-polly-use-llvm-names  -polly-codegen-ppcg  -polly-acc-use-shared 
-disable-output -polly-acc-dump-kernel-ir < C:\Users\Meinersbur\src\llvm
  \tools\polly\test\GPGPU\shared-memory-two-dimensional.ll |  FileCheck
-check-prefix=KERNEL
C:\Users\Meinersbur\src\llvm\tools\polly\test\GPGPU\shared-memory-two-dimensional.ll
  --
  Exit Code: 2147483651

  Command Output (stdout):
  --
  $ "opt" "-polly-process-unprofitable" "-polly-remarks-minimal"
"-polly-use-llvm-names" "-polly-codegen-ppcg" "-polly-acc-dump-code"
"-polly-acc-use-shared" "-disable-output"
  # command stderr:
  #0 0x50892f06 (C:\WINDOWS\SYSTEM32\MSVCP140D.dll+0x32f06)

  #1 0x00b92612 std::_Vector_const_iterator<class std::_Vector_val<struct
std::_Simple_types<class llvm::BasicBlock *> > >::operator*(void)const 
c:\program files (x86)\microsoft visual studio 14.0\vc\include\vector:73:0
  #2 0x00b931d0 std::vector<class llvm::BasicBlock *,class std::allocator<class
llvm::BasicBlock *> >::front(void)const  c:\program files (x86)\microsoft
visual studio 14.0\vc\include\vector:1262:0
  #3 0x00b93489 llvm::LoopBase<class llvm::BasicBlock,class
llvm::Loop>::getHeader(void)const 
c:\users\meinersbur\src\llvm\include\llvm\analysis\loopinfo.h:102:0
  #4 0x0119e1d5 PushLoopPHIs
c:\users\meinersbur\src\llvm\lib\analysis\scalarevolution.cpp:5777:0
  #5 0x01194bd0 llvm::ScalarEvolution::forgetLoop(class llvm::Loop const *)
c:\users\meinersbur\src\llvm\lib\analysis\scalarevolution.cpp:5893:0
  #6 0x01194d70 llvm::ScalarEvolution::forgetLoop(class llvm::Loop const *)
c:\users\meinersbur\src\llvm\lib\analysis\scalarevolution.cpp:5916:0
  #7 0x029a0232 GPUNodeBuilder::clearLoops(class llvm::Function *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\ppcgcodegeneration.cpp:1175:0
  #8 0x0299dc57 GPUNodeBuilder::createKernel(struct isl_ast_node *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\ppcgcodegeneration.cpp:1407:0
  #9 0x0299b19b GPUNodeBuilder::createUser(struct isl_ast_node *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\ppcgcodegeneration.cpp:980:0
  #10 0x02a47192 IslNodeBuilder::create(struct isl_ast_node *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\islnodebuilder.cpp:939:0
  #11 0x02a4ba79 IslNodeBuilder::createBlock(struct isl_ast_node *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\islnodebuilder.cpp:919:0
  #12 0x02a471ae IslNodeBuilder::create(struct isl_ast_node *)
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\islnodebuilder.cpp:942:0
  #13 0x029bce9b `anonymous namespace'::PPCGCodeGeneration::generateCode
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\ppcgcodegeneration.cpp:2660:0
  #14 0x029c0c48 `anonymous namespace'::PPCGCodeGeneration::runOnScop
c:\users\meinersbur\src\llvm\tools\polly\lib\codegen\ppcgcodegeneration.cpp:2691:0
  #15 0x029e8079 polly::ScopPass::runOnRegion(class llvm::Region *,class
llvm::RGPassManager &)
c:\users\meinersbur\src\llvm\tools\polly\lib\analysis\scoppass.cpp:26:0
  #16 0x0105643c llvm::RGPassManager::runOnFunction(class llvm::Function &)
c:\users\meinersbur\src\llvm\lib\analysis\regionpass.cpp:97:0
  #17 0x01a27d35 llvm::FPPassManager::runOnFunction(class llvm::Function &)
c:\users\meinersbur\src\llvm\lib\ir\legacypassmanager.cpp:1519:0
  #18 0x01a27eda llvm::FPPassManager::runOnModule(class llvm::Module &)
c:\users\meinersbur\src\llvm\lib\ir\legacypassmanager.cpp:1540:0
  #19 0x01a28f1e `anonymous namespace'::MPPassManager::runOnModule
c:\users\meinersbur\src\llvm\lib\ir\legacypassmanager.cpp:1596:0
  #20 0x01a295fa llvm::legacy::PassManagerImpl::run(class llvm::Module &)
c:\users\meinersbur\src\llvm\lib\ir\legacypassmanager.cpp:1699:0
  #21 0x01a23c3d llvm::legacy::PassManager::run(class llvm::Module &)
c:\users\meinersbur\src\llvm\lib\ir\legacypassmanager.cpp:1731:0
  #22 0x00ba5bd8 main c:\users\meinersbur\src\llvm\tools\opt\opt.cpp:749:0
  #23 0x031bf4de invoke_main
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:64:0
  #24 0x031bf360 _scrt_common_main_seh
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253:0
  #25 0x031bf1fd _scrt_common_main
f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:296:0
  #26 0x031bf4f8 mainCRTStartup
f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0
  #27 0x767d8744 (C:\WINDOWS\System32\KERNEL32.DLL+0x18744)
  #28 0x7707587d (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6587d)
  #29 0x7707584d (C:\WINDOWS\SYSTEM32\ntdll.dll+0x6584d)

-- 
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/20170529/c3e36098/attachment.html>


More information about the llvm-bugs mailing list