On 11 August 2007 08:42, Emmanuel Fleury wrote: > Hi, > > Sunzir Deepur wrote: >> >> so why are those class 3 edges created at all ? > > I didn't see any 3-edges blocks at all in your example.
Not 3-edge blocks; class 3 edges = the green lines. > These extra edges might come from a non-taken path that have been > removed after some further static-analysis of the code. Sorry, but I > didn't take a deeper look at your example. They appear to be showing where the fall-through path /would have/ gone in those BBs which end with an unconditional jump if there had been no jump. Edge class in the vcg output is determined by the 'class' arg passed by print_rtl_graph_with_bb to the draw_edge routine in graph.c. The only place that generates class 3 edges is the catch-all if (!edge_printed) clause at the end of the for (tmp_rtx) loop. The FOR_EACH_EDGE loop above will output all the 'real' edges that represent possible code flow paths, so it looks to me like gcc is using class 3 as a catch-all for things like EDGE_FAKE, EDGE_CROSSING, and any other of the kinds of edges (basic-block.h) that the compiler maintains for structural reasons that aren't real edges. You'd have to ask someone other than me for the details of what kinds of things other than real edges the compiler stores edge structs for, but that's what ends up being drawn as class 3. cheers, DaveK -- Can't think of a witty .sigline today....