-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/01/11 08:54, Tom de Vries wrote: > On 03/31/2011 11:16 PM, Tom de Vries wrote: >> On 03/31/2011 08:52 PM, Jeff Law wrote: >> >>> On 03/31/11 12:42, Tom de Vries wrote: >>>> Uses regnotes to analyze whether we can replace insn a by insn b, even >>>> if we cannot replace insn b by insn a. Uses this info in crossjumping. >> >>> Shouldn't this be using single_set rather than digging through PATTERN, >>> then verifying both are SETs, etc.? >>> >>> Otherwise don't you miss most of the benefit on architectures where most >>> insns clobber the flags register in a PARALLEL with the SET? >> >> I see what you mean about missing these insns currently. >> >> I guess I will have to check that the non-SET part of the PARALLEL is >> identical between the 2 insns. >> >> I'll update the patch to handle this case. > > changes compared to previous posting: > - add ChangeLog. > - use single_set > - add equal_different_set_p and use it in can_replace_by > > Retested on x86_64.
> PR target/43920 > * cfgcleanup.c (equal_different_set_p, can_replace_by, merge_dir): New > function. > (old_insns_match_p): Change return type. Replace return false/true with > return dir_none/dir_both. Use can_replace_by. > (flow_find_cross_jump): Add dir_p parameter. Init replacement direction > from dir_p. Register replacement direction in dir, last_dir and > afterlast_dir. Handle new return type of old_insns_match_p using > merge_dir. Return replacement direction in dir_p. > (flow_find_head_matching_sequence, outgoing_edges_match): Handle new > return type of old_insns_match_p. > (try_crossjump_to_edge): Add argument to call to flow_find_cross_jump. > * ifcvt.c ( cond_exec_process_if_block): Add argument to call to > flow_find_cross_jump. > * basic-block.h (enum replace_direction): New type. > (flow_find_cross_jump): Add parameter to declaration. OK Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNnKW/AAoJEBRtltQi2kC7TC8IAJdB1hgkPmmC787EUBBycPCF /ROYeWMZ62WyVqOD+eTVFXvv6v4s0XjPHQgS+zANBQPdvA3L8V2ugFYy66SWmQZj 1NSplCrBMRhS9Fu9M8uEWjvuVEUhqxOYLnPKXqeW/gD8UEHt2+gMLAGGFI4pxQRS L+caqVMGvNvVZqMNAUTU7FLQfT1Zo50sBvbvm9w/GfjSVNC/dmkHRqf4Ta0oIDW/ Zm5oyX4FWzun8NbW+scaQlsxAiEA5xoxzXyGlLnj9UGCTiEeaYIsgg+SyYO8CeO0 o3FpsRfe+jMSK170cd7+mufPktjmCuAdiWQa2M7W6R04AOvdOV7DxNglHMHXljg= =NrNE -----END PGP SIGNATURE-----