diff mbox series

ipa: Do not require RECORD_TYPE for ancestor jump functions

Message ID ri6lf22g2ez.fsf@suse.cz
State New
Headers show
Series ipa: Do not require RECORD_TYPE for ancestor jump functions | expand

Commit Message

Martin Jambor Nov. 5, 2021, 1:25 p.m. UTC
Hi,

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.

Pre-approved by Honza and bootstrapped and tested on x86_64-linux, I am
going to push it in a moment.

Martin


gcc/ChangeLog:

2021-11-04  Martin Jambor  <mjambor@suse.cz>

	* ipa-prop.c (compute_complex_assign_jump_func): Remove
	unnecessary check for RECORD_TYPE.
---
 gcc/ipa-prop.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 443f21ce61b..e85df0971fc 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