[LLVMdev] Getting all Basic Blocks in a Loop

Cameron Zwarich zwarich at apple.com
Wed Feb 20 02:16:05 PST 2013


Use Loop::getBlocks() after getting a Loop from LoopInfo.

Cameron

On Feb 20, 2013, at 2:01 AM, Blind Faith <person.of.book at gmail.com> wrote:

> I am writing an LLVM  pass, where in certain cases, I want to know all the basic blocks in a loop. I can get the loop header by using combination of 
> 
> AU.addRequired < LoopInfo >( );
> 
> and 
> 
> getAnalysis < LoopInfo > ( *F ).isLoopHeader( BB )
> 
> But how do I get to know every basic block in that loop.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the llvm-dev mailing list