[LLVMdev] ModulePass using BreakCriticalEdges [Followup]

Andreas Neustifter e0325716 at student.tuwien.ac.at
Wed May 13 07:39:20 PDT 2009


Hi,

Andreas Neustifter wrote:
> I'm writing a ModulePass that needs critical edges split up. I have the
> statement
> 
> 	AU.addRequiredID(BreakCriticalEdgesID);
> 
> in my getAnalysisUsage() but the pass never gets executed.
> 
> I guess I have to request pass execution for each function, but I can't
> get behind how to do that, since there is no analysis group for that
> kind of transformation.

I now also added a (selfwritten) FunctionPass with is member of the
analysis group ProfileInfo

	AU.addRequiredID(ProfileEstimatorID);
	AU.addRequired<ProfileInfo>();

and fetching the ProfileInfo by executing

	ProfileInfo *PI = &getAnalysis<ProfileInfo>(*F);

and now the BreakCriticalEdge pass gets also executed.

Seems to me that the FunctionPassManager generated when requesting the
ProfileInfo also executes the BreakCriticalEdges pass.

Andi



More information about the llvm-dev mailing list