[LLVMdev] The "scope" of passes

ether zhhb etherzhhb at gmail.com
Sat Apr 24 19:34:50 PDT 2010


On Sat, Apr 24, 2010 at 2:09 PM, Arjun Singri <arjunsingri at gmail.com> wrote:

> But is there a better way of getting the loops in a function than using
> LoopInfo?

maybe you could try the scc_iterator.

> For some tasks it is necessary that we don't process the same loop twice.

a looppass will not process a loop twice if you do not reinsert it into the
queue of loopmanager.

> Doing that with LoopInfo requires the use of a flag.

> On Fri, Apr 23, 2010 at 12:41 PM, Devang Patel <devang.patel at gmail.com>wrote:
>> On Thu, Apr 22, 2010 at 11:50 PM, Arjun <arjunsingri at gmail.com> wrote:
>> >> Personally, I would make everything a FunctionPass.
>> >
>> > What if a FunctionPass requires the results of a LoopPass? Is there a
>> way to get
>> > all loops of a function without using LoopPass and LoopInfo?
>> A LoopPass operates on loops. It updates/deletes loops. Its end result
>> is modified loops.
>> A FunctionPass operates on entire function.
>> LoopInfo is a FunctionPass that collect loops from a function. A
>> FunctionPass can certainly request another FunctionPass such as
>> LoopInfo.
>> -
>> Devang
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100425/4ad2bf32/attachment.html>

More information about the llvm-dev mailing list