Hi, On Mon, 12 Dec 2011, Jakub Jelinek wrote:
> Looks cleaner, yes. > Just I wonder: > 1) what if a bb contains no real insns (I know, they should be optimized > out, but do we assert that etc.?) - then the EXECUTE_IF_SET_IN_BITMAP > loop just wouldn't be done. Perhaps that is fine, it would make it > into the bitmap at the end of the bb and perhaps following bb would > do this loop. Not only perhaps. That is exactly what will happen. If some of the successor BBs then has real instructions _that_ one will cause creation of all the necessary conflicts. > 2) the PHIs are then handled always with visit_op instead of visit_conflict, > I'd guess the needed add_stack_var_conflict calls would then happen > in that EXECUTE_IF_SET_IN_BITMAP loop, right? Correct. The PHIs don't need to create the conflicts, any new mention of a DECL name will be noted as active, and then creates a conflict at the next real instruction (if not cancelled by a clobber before). > > I wonder how to best test this. > > One kind of testing was watching the size of .gcc_except_table going down > with each patch (vanilla -> optimize_cloobers -> optimize_clobbers thinko > fix -> sink_clobbers). My idea was to somehow check the EH tree for some dump (.ehcleanup2 perhaps) for being in the expected form, or that the correct number of removals happen. And of course that the sharing still happens, but that's even worse to test in the .expand dump :-/ Ciao, Michael.