<div dir="ltr"><div><div><div><div>Hi Fellows,<br><br></div>    I tried to build and execute the poolalloc transformation on a simple C program, but I got the following error. My poolalloc is git-cloned from <a href="https://github.com/llvm-mirror/poolalloc">https://github.com/llvm-mirror/poolalloc</a> (a LLVM 3.3 compatible repo). Any thoughts on how to fix it?<br>
<br><br>PV@PV-h8-1280t:~/LLVM/llvm-3.3.src/projects/poolalloc$ opt -S -load ./Debug+Asserts/lib/LLVMDataStructure.so -load ./Debug+Asserts/lib/poolalloc.so -poolalloc < test.ll <br>Pool allocating 0 global nodes!<br>0  opt             0x00000000017381de llvm::sys::PrintStackTrace(_IO_FILE*) + 46<br>
1  opt             0x000000000173849b<br>2  opt             0x000000000173870e<br>3  libpthread.so.0 0x00007f6f5d570cb0<br>4  poolalloc.so    0x00007f6f5bf73cbf llvm::PA::Heuristic::getLocalPoolNodes(llvm::Function const&, std::vector<llvm::DSNode const*, std::allocator<llvm::DSNode const*> >&) + 31<br>
5  poolalloc.so    0x00007f6f5bfb8279 llvm::PoolAllocate::ProcessFunctionBody(llvm::Function&, llvm::Function&) + 633<br>6  poolalloc.so    0x00007f6f5bfb5b80 llvm::PoolAllocate::runOnModule(llvm::Module&) + 1312<br>
7  opt             0x00000000016ad00a llvm::MPPassManager::runOnModule(llvm::Module&) + 634<br>8  opt             0x00000000016ad7be llvm::PassManagerImpl::run(llvm::Module&) + 302<br>9  opt             0x00000000016ada11 llvm::PassManager::run(llvm::Module&) + 33<br>
10 opt             0x000000000063e5c1 main + 6609<br>11 libc.so.6       0x00007f6f5c5a076d __libc_start_main + 237<br>12 opt             0x000000000062fb75<br>Stack dump:<br>0.    Program arguments: opt -S -load ./Debug+Asserts/lib/LLVMDataStructure.so -load ./Debug+Asserts/lib/poolalloc.so -poolalloc <br>
1.    Running pass 'Pool allocate disjoint data structures' on module '<stdin>'.<br>drive_all.sh: line 3:  5947 Segmentation fault      (core dumped) opt -S -load ./Debug+Asserts/lib/LLVMDataStructure.so -load ./Debug+Asserts/lib/poolalloc.so -poolalloc < test.ll<br>
<br> <br><br></div>P.S. The input C program is the program listed in Figure 1 of Chris Lattner's PLDI 2005 paper.<br><br><br></div>Best,<br></div>Paul<br></div>