[LLVMdev] How to get the PostDominanceFr
xia_yimin
xia_yimin at sina.com
Tue Sep 14 06:26:07 PDT 2004
Hi, Chris
I get a new PostDominanceFrontier class by combinating the code of PostDominanceSet/PostDominanceTree/PostDominanceFrontier FunctionPasses. It works very well.
BTW: Why the PostDominanceFrontier FunctionPasses does not use the formal argument in runOnFunction(Function &)? Does it gets the Function from PassManager?
Thank you.
Xia
>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)
More information about the llvm-dev
mailing list