From: Martin Liska Date: Thu, 14 Nov 2019 08:35:35 +0000 (+0100) Subject: Handle FIELD_DECL in IPA ICF. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7edcaa0b54eae1537622bc70a4f8702e15148e4c;p=gcc.git Handle FIELD_DECL in IPA ICF. 2019-11-14 Martin Liska * ipa-icf-gimple.c (func_checker::hash_operand): Improve func_checker::hash_operand by handling of FIELD_DECLs. From-SVN: r278208 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e60da6e0322..50b9032365b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-11-14 Martin Liska + + * ipa-icf-gimple.c (func_checker::hash_operand): Improve + func_checker::hash_operand by handling of FIELD_DECLs. + 2019-11-14 Martin Liska * ipa-icf-gimple.h (func_checker::func_checker): Add diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index edb8fd66e08..ac53a1dfbbf 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -234,7 +234,10 @@ func_checker::hash_operand (const_tree arg, inchash::hash &hstate, case CONST_DECL: case SSA_NAME: return; - + case FIELD_DECL: + inchash::add_expr (DECL_FIELD_OFFSET (arg), hstate, flags); + inchash::add_expr (DECL_FIELD_BIT_OFFSET (arg), hstate, flags); + return; default: break; }