From: Martin Jambor Date: Fri, 5 Nov 2021 13:04:42 +0000 (+0100) Subject: ipa: Do not require RECORD_TYPE for ancestor jump functions X-Git-Tag: basepoints/gcc-13~3375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea42c80585b831fc4f7a0b2576a3d8d3244d8d32;p=thirdparty%2Fgcc.git ipa: Do not require RECORD_TYPE for ancestor jump functions The check this patch removes has remained from times when ancestor jump functions have been only used for devirtualization and also contained BINFOs. It is not necessary now and should have been removed long time ago. gcc/ChangeLog: 2021-11-04 Martin Jambor * ipa-prop.c (compute_complex_assign_jump_func): Remove unnecessary check for RECORD_TYPE. --- diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 443f21ce61b3..e85df0971fcb 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1421,8 +1421,6 @@ compute_complex_assign_jump_func (struct ipa_func_body_info *fbi, if (TREE_CODE (op1) != ADDR_EXPR) return; op1 = TREE_OPERAND (op1, 0); - if (TREE_CODE (TREE_TYPE (op1)) != RECORD_TYPE) - return; base = get_ref_base_and_extent_hwi (op1, &offset, &size, &reverse); offset_int mem_offset; if (!base