Index: llvm/include/llvm/Analysis/LoopInfo.h =================================================================== --- llvm/include/llvm/Analysis/LoopInfo.h +++ llvm/include/llvm/Analysis/LoopInfo.h @@ -103,6 +103,9 @@ return D; } BlockT *getHeader() const { return getBlocks().front(); } + // Return the parent loop of this loop (i.e. the loop in which + // this loop is entirely contained). If there's no such loop (i.e. + // this is a top level loop in the function), return null. LoopT *getParentLoop() const { return ParentLoop; } /// This is a raw interface for bypassing addChildLoop.