David Blaikie
2011-Nov-30 06:13 UTC
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
On Tue, Nov 29, 2011 at 6:59 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:> The following code is causing an "UNREACHABLE executed!" and a stack dump, > any ideas?The stack might be handy.> namespace { > struct myPass : public CallGraphSCCPass { > static char ID; > myPass() : CallGraphSCCPass(ID) {} > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesAll(); > AU.addRequired<LoopInfo>(); > } > virtual bool runOnSCC(CallGraphSCC &SCC) { > for (CallGraphSCC::iterator CGNodeItr = SCC.begin(), > CFNodeItrE=SCC.end();CGNodeItr!=CGNodeItrE;++CGNodeItr) } > const CallGraphNode *CGNode = *CGNodeItr; > Function *F = CGNode->getFunction(); > if (!F->isDeclaration()) > LoopInfo &LI = getAnalysis<LoopInfo>(*F); > } > return false; > } > }; > char myPass::ID = 0; > static RegisterPass<myPass> X("myPass", "This is my pass", false, false); > } > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Ryan Taylor
2011-Nov-30 16:00 UTC
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
UNREACHABLE executed! 0 opt 0x00000000008edc2f 1 opt 0x00000000008edfda 2 libpthread.so.0 0x00007f9c8e69bc60 3 libc.so.6 0x00007f9c8d986d05 gsignal + 53 4 libc.so.6 0x00007f9c8d98aab6 abort + 390 5 opt 0x00000000008da974 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 356 6 opt 0x000000000087e046 7 opt 0x0000000000882b45 llvm::PMDataManager::add(llvm::Pass*, bool) + 741 8 opt 0x000000000087f413 llvm::PassManager::add(llvm::Pass*) + 259 9 opt 0x00000000004ab9be main + 2174 10 libc.so.6 0x00007f9c8d971eff __libc_start_main + 255 11 opt 0x000000000049f5f9 Stack dump: On Wed, Nov 30, 2011 at 1:13 AM, David Blaikie <dblaikie at gmail.com> wrote:> On Tue, Nov 29, 2011 at 6:59 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: > > The following code is causing an "UNREACHABLE executed!" and a stack > dump, > > any ideas? > > The stack might be handy. > > > namespace { > > struct myPass : public CallGraphSCCPass { > > static char ID; > > myPass() : CallGraphSCCPass(ID) {} > > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > > AU.setPreservesAll(); > > AU.addRequired<LoopInfo>(); > > } > > virtual bool runOnSCC(CallGraphSCC &SCC) { > > for (CallGraphSCC::iterator CGNodeItr = SCC.begin(), > > CFNodeItrE=SCC.end();CGNodeItr!=CGNodeItrE;++CGNodeItr) } > > const CallGraphNode *CGNode = *CGNodeItr; > > Function *F = CGNode->getFunction(); > > if (!F->isDeclaration()) > > LoopInfo &LI = getAnalysis<LoopInfo>(*F); > > } > > return false; > > } > > }; > > char myPass::ID = 0; > > static RegisterPass<myPass> X("myPass", "This is my pass", false, > false); > > } > > > > _______________________________________________ > > 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/20111130/8b6e896b/attachment.html>
Ryan Taylor
2011-Nov-30 16:02 UTC
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
I didn't put this in the original post because I first wanted to know if I was using the getAnalysisUsage and getAnalysis correctly, which from what I've read, it seems so, below is the full error I am getting; On Wed, Nov 30, 2011 at 11:00 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:> > UNREACHABLE executed! > 0 opt 0x00000000008edc2f > 1 opt 0x00000000008edfda > 2 libpthread.so.0 0x00007f9c8e69bc60 > 3 libc.so.6 0x00007f9c8d986d05 gsignal + 53 > 4 libc.so.6 0x00007f9c8d98aab6 abort + 390 > 5 opt 0x00000000008da974 llvm::llvm_unreachable_internal(char > const*, char const*, unsigned int) + 356 > 6 opt 0x000000000087e046 > 7 opt 0x0000000000882b45 > llvm::PMDataManager::add(llvm::Pass*, bool) + 741 > 8 opt 0x000000000087f413 llvm::PassManager::add(llvm::Pass*) > + 259 > 9 opt 0x00000000004ab9be main + 2174 > 10 libc.so.6 0x00007f9c8d971eff __libc_start_main + 255 > 11 opt 0x000000000049f5f9 > Stack dump: > On Wed, Nov 30, 2011 at 1:13 AM, David Blaikie <dblaikie at gmail.com> wrote: > >> On Tue, Nov 29, 2011 at 6:59 PM, Ryan Taylor <ryta1203 at gmail.com> wrote: >> > The following code is causing an "UNREACHABLE executed!" and a stack >> dump, >> > any ideas? >> >> The stack might be handy. >> >> > namespace { >> > struct myPass : public CallGraphSCCPass { >> > static char ID; >> > myPass() : CallGraphSCCPass(ID) {} >> > virtual void getAnalysisUsage(AnalysisUsage &AU) const { >> > AU.setPreservesAll(); >> > AU.addRequired<LoopInfo>(); >> > } >> > virtual bool runOnSCC(CallGraphSCC &SCC) { >> > for (CallGraphSCC::iterator CGNodeItr = SCC.begin(), >> > CFNodeItrE=SCC.end();CGNodeItr!=CGNodeItrE;++CGNodeItr) } >> > const CallGraphNode *CGNode = *CGNodeItr; >> > Function *F = CGNode->getFunction(); >> > if (!F->isDeclaration()) >> > LoopInfo &LI = getAnalysis<LoopInfo>(*F); >> > } >> > return false; >> > } >> > }; >> > char myPass::ID = 0; >> > static RegisterPass<myPass> X("myPass", "This is my pass", false, >> false); >> > } >> > >> > _______________________________________________ >> > 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/20111130/3e5473fe/attachment.html>
Seemingly Similar Threads
- [LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
- [LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
- [LLVMdev] Problem getting LoopInfo inside non-LoopPass
- [LLVMdev] Problem getting LoopInfo inside non-LoopPass
- [LLVMdev] Problem getting LoopInfo inside non-LoopPass