<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">In addition to the link below, please check for functions like "llvm.debug.declare", "llvm.debug.value", as you will not get LoopInfo for these. </SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"><VAR id=yui-ie-cursor></VAR></SPAN> </div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN><SPAN style="RIGHT: auto">Pankaj</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="RIGHT: auto"><BR style="RIGHT: auto"></div>
<DIV style="FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif; FONT-SIZE: 10pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Devang Patel <dpatel@apple.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Ryan Taylor <ryta1203@gmail.com> <BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> llvmdev@cs.uiuc.edu <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, November 30, 2011 11:08 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [LLVMdev] Problem getting LoopInfo inside non-LoopPass<BR></FONT><BR>Ryan,<BR><BR>See http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-November/045423.html<BR><BR>-<BR>Devang<BR><BR>On Nov 29, 2011, at 6:59 PM, Ryan Taylor
wrote:<BR><BR>> The following code is causing an "UNREACHABLE executed!" and a stack dump, any ideas?<BR>> <BR>> namespace {<BR>> struct myPass : public CallGraphSCCPass {<BR>> static char ID;<BR>> myPass() : CallGraphSCCPass(ID) {}<BR>> virtual void getAnalysisUsage(AnalysisUsage &AU) const {<BR>> AU.setPreservesAll();<BR>> AU.addRequired<LoopInfo>();<BR>> }<BR>> virtual bool runOnSCC(CallGraphSCC &SCC) {<BR>> for (CallGraphSCC::iterator CGNodeItr = SCC.begin(), CFNodeItrE=SCC.end();CGNodeItr!=CGNodeItrE;++CGNodeItr) }<BR>> const CallGraphNode *CGNode = *CGNodeItr;<BR>> Function *F = CGNode->getFunction();<BR>>
if (!F->isDeclaration()) <BR>> LoopInfo &LI = getAnalysis<LoopInfo>(*F);<BR>> }<BR>> return false;<BR>> }<BR>> };<BR>> char myPass::ID = 0;<BR>> static RegisterPass<myPass> X("myPass", "This is my pass", false, false);<BR>> }<BR>> _______________________________________________<BR>> LLVM Developers mailing list<BR>> <A href="mailto:LLVMdev@cs.uiuc.edu" ymailto="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A> http://llvm.cs.uiuc.edu<BR>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev<BR><BR>_______________________________________________<BR>LLVM Developers mailing list<BR><A
href="mailto:LLVMdev@cs.uiuc.edu" ymailto="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</A> <A href="http://llvm.cs.uiuc.edu/" target=_blank>http://llvm.cs.uiuc.edu</A><BR><A href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target=_blank>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</A><BR><BR><BR></DIV></DIV></div></body></html>