Dear guys, when the phi-elimination pass is called (after local register allocation, for example), it seems to me that the control flow graph may have critical edges. Is it true? If it is true, I would like to know more about the algorithm that you guys use to destroy phi-functions. Is there any reference? Why did not implement a machine function pass to remove critical edges? I mean, I would like to implement something like this. Is there any problem that would make it hard? Thank you very much, Fernando
Dear guys, I've adapted the pass in BreakCriticalEdges.cpp so I can use it before register allocation. But the pass is not changing the control flow graph of the machine function. I think it is because I am inserting the pass after the control flow graph of the machine function is built. I am inserting the pass as required by the register allocator, and I can see that the pass is splitting critical edges. Question is: where do I insert this pass so its modifications reflects in the control flow graph of the machine function? The code of the pass is the code of BreakCriticalEdges.cpp, and it is a runOnFunction pass, not a runOnMachineFunction. Thank you very much, Fernando