From 7edcaa0b54eae1537622bc70a4f8702e15148e4c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 14 Nov 2019 09:35:35 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/ipa-icf-gimple.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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; } -- 2.30.2