I would like to know how one can identify whether a basic block is a loop header? Regards, Ashutosh Shukla, 10305052 M. Tech 1 Dept of Computer Science and Engg.
LoopInfo::isLoopHeader(bb) from llvm/Analysis/LoopInfo.h. On Fri, May 6, 2011 at 10:39 AM, Shukla Ashutosh Dinesh <ashutoshds at cse.iitb.ac.in> wrote:> I would like to know how one can identify whether a basic block is a loop > header? > > > Regards, > Ashutosh Shukla, > 10305052 > M. Tech 1 > Dept of Computer Science and Engg. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On 5/6/11 11:39 AM, Shukla Ashutosh Dinesh wrote:> I would like to know how one can identify whether a basic block is a loop > header?I think the LoopInfo pass has a method to do this. Note that you'll probably want to run -loopsimplify first to put the loops into a canonical form. -- John T.> > Regards, > Ashutosh Shukla, > 10305052 > M. Tech 1 > Dept of Computer Science and Engg. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev