[LLVMdev] Should repetitive basic blocks be removed in the results of LoopBase::getExitBlocks()?

Andrew Trick atrick at apple.com
Mon Apr 23 22:31:50 PDT 2012


On Apr 19, 2012, at 10:43 PM, xiaoming gu <xiaoming.gu at gmail.com> wrote:

> Hi, all. I'm using void LoopBase::getExitBlocks (SmallVectorImpl< BlockT * > &ExitBlocks) const to get all 
> exit blocks for a loop. The problem I find with this API is that it returns repetitive basic blocks in certain 
> situations. Should repetitive basic blocks be removed?

Users generally expect a unique set of exit blocks, but don't make any strong assumption. The worst that can happen is missed optimization or redundant analysis. In most cases, the loop is in LoopSimplifyForm, so it's probably not a problem in practice.

-Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120423/7de00d74/attachment.html>


More information about the llvm-dev mailing list