Hi, 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. Thanks, Andi
Hi all, i'm working atm on a backend for a processor architecture that is capable of storing the carry flag of ADDC in an 1-bit register class. So I tried to lower the ADDC instruction to generate two register values as result. On the tablegen description of the instruction i came across the tablegen restriction that only one output result of one instruction is possible: assert(NumResults <= 1 && "We only work with nodes with zero or one result so far!"); So my question is now how much work it would be to remove this restriction in tablegen. What do I have to take into consideration? Thanks, Timo Stripf
Andreas Neustifter
2009-May-13 14:39 UTC
[LLVMdev] ModulePass using BreakCriticalEdges [Followup]
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
Chris Lattner
2009-May-13 17:13 UTC
[LLVMdev] ModulePass using BreakCriticalEdges [Followup]
On May 13, 2009, at 7:39 AM, Andreas Neustifter wrote:> 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 ProfileInfoThis isn't an answer to your question, but you can also use the SplitCriticalEdge family of functions from your pass, without using the BreakCriticalEdges pass. -Chris