It looks like this problem only exists on nested loops, ideas? On Thu, Jan 12, 2012 at 11:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:> Is it not a good idea to try and extract loops that have multiple exits? > > > On Thu, Jan 12, 2012 at 10:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> I am trying to use ExtractLoop() but I am getting segFaults: >> >> 0 opt 0x00000000008edc2f >> 1 opt 0x00000000008edfda >> 2 libpthread.so.0 0x00007ffe21203c60 >> 3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9 >> 4 LLVMEXITCDFG.so 0x00007ffe202b80d7 >> 5 opt 0x00000000006fc6e7 >> llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143 >> 6 opt 0x0000000000882557 >> llvm::FPPassManager::runOnFunction(llvm::Function&) + 551 >> 7 opt 0x00000000008825db >> llvm::FPPassManager::runOnModule(llvm::Module&) + 75 >> 8 opt 0x0000000000882197 >> llvm::MPPassManager::runOnModule(llvm::Module&) + 503 >> 9 opt 0x0000000000882299 >> llvm::PassManagerImpl::run(llvm::Module&) + 137 >> 10 opt 0x00000000004ac451 main + 4881 >> 11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255 >> 12 opt 0x000000000049f5f9 >> Stack dump: >> 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 >> 1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'. >> 2. Running pass 'Loop Pass Manager' on function '@fix_fft' >> 3. Running pass 'CDFG exitPass' on basic block '%bb3' >> ./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 >> >> If I remove the "deleteLoopFromQueue" function call, it goes over all the >> loops (supposedly extracting them) and then segFaults. >> >> How should I properly use this function? >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/cbe19056/attachment.html>
Filing a bug with a test case would be a good start. Cameron On Jan 12, 2012, at 12:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:> It looks like this problem only exists on nested loops, ideas? > > > On Thu, Jan 12, 2012 at 11:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Is it not a good idea to try and extract loops that have multiple exits? > > > On Thu, Jan 12, 2012 at 10:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > I am trying to use ExtractLoop() but I am getting segFaults: > > 0 opt 0x00000000008edc2f > 1 opt 0x00000000008edfda > 2 libpthread.so.0 0x00007ffe21203c60 > 3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9 > 4 LLVMEXITCDFG.so 0x00007ffe202b80d7 > 5 opt 0x00000000006fc6e7 llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143 > 6 opt 0x0000000000882557 llvm::FPPassManager::runOnFunction(llvm::Function&) + 551 > 7 opt 0x00000000008825db llvm::FPPassManager::runOnModule(llvm::Module&) + 75 > 8 opt 0x0000000000882197 llvm::MPPassManager::runOnModule(llvm::Module&) + 503 > 9 opt 0x0000000000882299 llvm::PassManagerImpl::run(llvm::Module&) + 137 > 10 opt 0x00000000004ac451 main + 4881 > 11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255 > 12 opt 0x000000000049f5f9 > Stack dump: > 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 > 1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'. > 2. Running pass 'Loop Pass Manager' on function '@fix_fft' > 3. Running pass 'CDFG exitPass' on basic block '%bb3' > ./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 > > If I remove the "deleteLoopFromQueue" function call, it goes over all the loops (supposedly extracting them) and then segFaults. > > How should I properly use this function? > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/67b353db/attachment.html>
---------- Forwarded message ---------- From: Ryan Taylor <ryta1203 at gmail.com> Date: Thu, Jan 12, 2012 at 12:22 PM Subject: Re: [LLVMdev] Extract Loop Failing To: Cameron Zwarich <zwarich at apple.com> I'm not sure it's a bug. If I don't know if I am properly using it then how would I know it's a bug and not simply a user issue? If it sounds like a bug to you then I will file it. :) On Thu, Jan 12, 2012 at 12:18 PM, Cameron Zwarich <zwarich at apple.com> wrote:> Filing a bug with a test case would be a good start. > > Cameron > > On Jan 12, 2012, at 12:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > > It looks like this problem only exists on nested loops, ideas? > > > On Thu, Jan 12, 2012 at 11:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> Is it not a good idea to try and extract loops that have multiple exits? >> >> >> On Thu, Jan 12, 2012 at 10:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> >>> I am trying to use ExtractLoop() but I am getting segFaults: >>> >>> 0 opt 0x00000000008edc2f >>> 1 opt 0x00000000008edfda >>> 2 libpthread.so.0 0x00007ffe21203c60 >>> 3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9 >>> 4 LLVMEXITCDFG.so 0x00007ffe202b80d7 >>> 5 opt 0x00000000006fc6e7 >>> llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143 >>> 6 opt 0x0000000000882557 >>> llvm::FPPassManager::runOnFunction(llvm::Function&) + 551 >>> 7 opt 0x00000000008825db >>> llvm::FPPassManager::runOnModule(llvm::Module&) + 75 >>> 8 opt 0x0000000000882197 >>> llvm::MPPassManager::runOnModule(llvm::Module&) + 503 >>> 9 opt 0x0000000000882299 >>> llvm::PassManagerImpl::run(llvm::Module&) + 137 >>> 10 opt 0x00000000004ac451 main + 4881 >>> 11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255 >>> 12 opt 0x000000000049f5f9 >>> Stack dump: >>> 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 >>> 1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'. >>> 2. Running pass 'Loop Pass Manager' on function '@fix_fft' >>> 3. Running pass 'CDFG exitPass' on basic block '%bb3' >>> ./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 >>> >>> If I remove the "deleteLoopFromQueue" function call, it goes over all >>> the loops (supposedly extracting them) and then segFaults. >>> >>> How should I properly use this function? >>> >> >> > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/55b9d805/attachment.html>
How do you expect people to be able to tell you if you are using it properly if they can't see how you are using it? Cameron On Jan 12, 2012, at 12:22 PM, Ryan Taylor wrote:> I'm not sure it's a bug. If I don't know if I am properly using it then how would I know it's a bug and not simply a user issue? If it sounds like a bug to you then I will file it. :) > > On Thu, Jan 12, 2012 at 12:18 PM, Cameron Zwarich <zwarich at apple.com> wrote: > Filing a bug with a test case would be a good start. > > Cameron > > On Jan 12, 2012, at 12:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > >> It looks like this problem only exists on nested loops, ideas? >> >> >> On Thu, Jan 12, 2012 at 11:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> Is it not a good idea to try and extract loops that have multiple exits? >> >> >> On Thu, Jan 12, 2012 at 10:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> I am trying to use ExtractLoop() but I am getting segFaults: >> >> 0 opt 0x00000000008edc2f >> 1 opt 0x00000000008edfda >> 2 libpthread.so.0 0x00007ffe21203c60 >> 3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9 >> 4 LLVMEXITCDFG.so 0x00007ffe202b80d7 >> 5 opt 0x00000000006fc6e7 llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143 >> 6 opt 0x0000000000882557 llvm::FPPassManager::runOnFunction(llvm::Function&) + 551 >> 7 opt 0x00000000008825db llvm::FPPassManager::runOnModule(llvm::Module&) + 75 >> 8 opt 0x0000000000882197 llvm::MPPassManager::runOnModule(llvm::Module&) + 503 >> 9 opt 0x0000000000882299 llvm::PassManagerImpl::run(llvm::Module&) + 137 >> 10 opt 0x00000000004ac451 main + 4881 >> 11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255 >> 12 opt 0x000000000049f5f9 >> Stack dump: >> 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 >> 1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'. >> 2. Running pass 'Loop Pass Manager' on function '@fix_fft' >> 3. Running pass 'CDFG exitPass' on basic block '%bb3' >> ./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 >> >> If I remove the "deleteLoopFromQueue" function call, it goes over all the loops (supposedly extracting them) and then segFaults. >> >> How should I properly use this function? >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/e4098131/attachment.html>
if (shouldExtractLoop) { if (ExtractLoop(DT, L, AggregateArgs) != 0) { errs()<<"Extracting, now deleting loop from queue\n"; Changed = true; if (L->getParentLoop()) { LPM.deleteLoopFromQueue(L); } errs()<<"Extracting Loop "<<L->getHeader()->getName().str()<<"\n"; } } On Thu, Jan 12, 2012 at 12:23 PM, Cameron Zwarich <zwarich at apple.com> wrote:> How do you expect people to be able to tell you if you are using it > properly if they can't see how you are using it? > > Cameron > > On Jan 12, 2012, at 12:22 PM, Ryan Taylor wrote: > > I'm not sure it's a bug. If I don't know if I am properly using it then > how would I know it's a bug and not simply a user issue? If it sounds like > a bug to you then I will file it. :) > > On Thu, Jan 12, 2012 at 12:18 PM, Cameron Zwarich <zwarich at apple.com>wrote: > >> Filing a bug with a test case would be a good start. >> >> Cameron >> >> On Jan 12, 2012, at 12:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> >> It looks like this problem only exists on nested loops, ideas? >> >> >> On Thu, Jan 12, 2012 at 11:44 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> >>> Is it not a good idea to try and extract loops that have multiple exits? >>> >>> >>> On Thu, Jan 12, 2012 at 10:44 AM, Ryan Taylor <ryta1203 at gmail.com>wrote: >>> >>>> I am trying to use ExtractLoop() but I am getting segFaults: >>>> >>>> 0 opt 0x00000000008edc2f >>>> 1 opt 0x00000000008edfda >>>> 2 libpthread.so.0 0x00007ffe21203c60 >>>> 3 opt 0x0000000000895ed9 llvm::Value::getName() const + 9 >>>> 4 LLVMEXITCDFG.so 0x00007ffe202b80d7 >>>> 5 opt 0x00000000006fc6e7 >>>> llvm::LPPassManager::runOnFunction(llvm::Function&) + 1143 >>>> 6 opt 0x0000000000882557 >>>> llvm::FPPassManager::runOnFunction(llvm::Function&) + 551 >>>> 7 opt 0x00000000008825db >>>> llvm::FPPassManager::runOnModule(llvm::Module&) + 75 >>>> 8 opt 0x0000000000882197 >>>> llvm::MPPassManager::runOnModule(llvm::Module&) + 503 >>>> 9 opt 0x0000000000882299 >>>> llvm::PassManagerImpl::run(llvm::Module&) + 137 >>>> 10 opt 0x00000000004ac451 main + 4881 >>>> 11 libc.so.6 0x00007ffe204d9eff __libc_start_main + 255 >>>> 12 opt 0x000000000049f5f9 >>>> Stack dump: >>>> 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 >>>> 1. Running pass 'Function Pass Manager' on module 'fix_fft.c.bc'. >>>> 2. Running pass 'Loop Pass Manager' on function '@fix_fft' >>>> 3. Running pass 'CDFG exitPass' on basic block '%bb3' >>>> ./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 >>>> >>>> If I remove the "deleteLoopFromQueue" function call, it goes over all >>>> the loops (supposedly extracting them) and then segFaults. >>>> >>>> How should I properly use this function? >>>> >>> >>> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120112/61117da3/attachment.html>