aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-11-20 11:06:48 +0100
committerJan Hubicka <jh@suse.cz>2020-11-20 11:06:48 +0100
commit8e39410125a81af00fac28f186e8e3e00f5751e3 (patch)
treeff93b686a1130dab90fddedda7f08f3bc1a2ce68 /gcc/gimple-fold.c
parentfdace7584056de2f63bde2e3087f26beb6b0f97d (diff)
downloadgcc-8e39410125a81af00fac28f186e8e3e00f5751e3.zip
gcc-8e39410125a81af00fac28f186e8e3e00f5751e3.tar.gz
gcc-8e39410125a81af00fac28f186e8e3e00f5751e3.tar.bz2
Fix comparsion of {CLOBBER} in icf
after fixing few issues I gotto stage where 1.4M icf mismatches are due to comparing two gimple clobber. The problem is that operand_equal_p match clobber case CONSTRUCTOR: /* In GIMPLE empty constructors are allowed in initializers of aggregates. */ return !CONSTRUCTOR_NELTS (arg0) && !CONSTRUCTOR_NELTS (arg1); But this happens too late after comparing its types (that are not very relevant for memory store). In the context of ipa-icf we do not really need to match RHS of gimple clobbers: it is enough to know that the LHS stores can be considered equivalent. I this added logic to hash them all the same way and compare using TREE_CLOBBER_P flag. I see other option in extending operand_equal_p in fold-const to handle them more generously or making stmt hash and compare to skip comparing/hashing RHS of gimple_clobber_p. * ipa-icf-gimple.c (func_checker::hash_operand): Hash gimple clobber. (func_checker::operand_equal_p): Special case gimple clobber.
Diffstat (limited to 'gcc/gimple-fold.c')
0 files changed, 0 insertions, 0 deletions