[LLVMdev] How to get the PostDominanceFr

Chris Lattner sabre at nondot.org
Tue Sep 14 08:27:40 PDT 2004


On Tue, 14 Sep 2004, xia_yimin wrote:

> Hi, Chris
>
> I get a new PostDominanceFrontier class by combinating the code of
> PostDominanceSet/PostDominanceTree/PostDominanceFrontier FunctionPasses.
> It works very well.

Ok, cool!

> BTW: Why the PostDominanceFrontier FunctionPasses does not use the
> formal argument in runOnFunction(Function &)? Does it gets the Function
> from PassManager?

It gets it from the PostDominatorTree that it uses to build the DF.

-Chris

> >On Thu, 9 Sep 2004, xia_yimin wrote:
> >
> >> When analysing a function "fn", my FunctionPass needs some
> >> PostDominanceFrontier information of functions which are called by
> >> function "fn".
> >
> > Okay, first problem is that your algorithm does not qualify as a
> FunctionPass: it should be a general Pass, because it looks at more than
> > one function at a time.
> >
> >> getAnalysis<PostDominanceFrontier>() cannot give the information,
> >> because it only gives the PostDominanceFrontier information of "fn", not
> >> the PostDominanceFrontier information of functions called by "fn".
> >
> > Yes.
> >
> >> How to get the PostDominanceFrontier information of functions which are
> >> called by "fn"?
> >
> > Unfortunately, there is no way to do this currently.  The problem is that
> > Pass instances cannot "require" FunctionPass instances.  This is a
> long-standing deficiency (e.g., see:
> > http://llvm.cs.uiuc.edu/docs/WritingAnLLVMPass.html#PassFunctionPass, and
> > http://llvm.cs.uiuc.edu/PR36), and has been annoying in many different
> > cases.  However, until it bothers someone enough to fix it, it probably
> > won't be addressed.
> >
> > -Chris
>
>
> ______________________________________
>
> ×¢²áÐÂÀË30Õ×Ãâ·ÑÓÊÏ䣨 http://mail.sina.com.cn/chooseMode.html £©
>
> ===================================================================
> ¿ÓѳöÓÎÃØ·½,ËÑÒ׵öÀ¼ÒÅÚÖÆ:Ë÷ÄáT1 3500 (http://ad4.sina.com.cn/wx/ads/zhuiyu_hprefresh1.html)
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://llvm.org/
http://nondot.org/sabre/





More information about the llvm-dev mailing list