This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ifcvt/crossjump patch: Fix PR 42496, 21803


On 07/27/10 16:38, Eric Botcazou wrote:
Well, I don't know what if anything Eric has in mind, but assuming we have

BB1
lots of stuff
if (x) goto A;
BB2
y = 1;
goto C;
BB3
A: y = 1;
goto D;

how can we possibly avoid code movement?
Split BB2 and BB3 after "y = 1;" and redirect the edges from BB1.  Then split
BB1 before the test and insert one instance of the common heads.
Which to me seems more convoluted than just moving insns implementing the common code. And I think that's the whole point behind the disagreement. While we *can* formulate this as a series of CFG manipulations I think it actually makes the resulting transformation more difficult to understand.

Also note that trying to pluck common insns that aren't at the head of the blocks is more difficult to do as a pure CFG transformation (it's doable, just ugly) while it ought to be trivial to just move them around.


Jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]