I am trying to use ExtractLoop() but I am getting segFaults:<br><br>0 opt 0x00000000008edc2f<br>1 opt 0x00000000008edfda<br>2 libpthread.so.0 0x00007ffe21203c60<br>3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9<br>
4 LLVMEXITCDFG.so 0x00007ffe202b80d7<br>5 opt 0x00000000006fc6e7 llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143<br>6 opt 0x0000000000882557 llvm::FPPassManager::runOnFunction(llvm::Function&) + 551<br>
7 opt 0x00000000008825db llvm::FPPassManager::runOnModule(llvm::Module&) + 75<br>8 opt 0x0000000000882197 llvm::MPPassManager::runOnModule(llvm::Module&) + 503<br>9 opt 0x0000000000882299 llvm::PassManagerImpl::run(llvm::Module&) + 137<br>
10 opt 0x00000000004ac451 main + 4881<br>11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255<br>12 opt 0x000000000049f5f9<br>Stack dump:<br>0. Program arguments: opt -load /home/ryan/llvm/llvm_core/llvm-2.9/Release/lib/LLVMEXITCDFG.so -exitPass fix_fft.c.bc -o fix_fft.c.bc <br>
1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'.<br>2. Running pass 'Loop Pass Manager' on function '@fix_fft'<br>3. Running pass 'CDFG exitPass' on basic block '%bb3'<br>
./optScript.sh: line 46: 2637 Segmentation fault opt -load /home/ryan/llvm/llvm_core/llvm-2.9/Release/lib/LLVMEXITCDFG.so -exitPass $1.bc -o ${1}.bc<br><br>If I remove the "deleteLoopFromQueue" function call, it goes over all the loops (supposedly extracting them) and then segFaults.<br>
<br>How should I properly use this function?<br>