aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2019-12-06 01:08:47 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-12-06 00:08:47 +0000
commitc199f329bdc5dd12afb76f3a58dfb8fd094577d3 (patch)
tree016e6fe04be691efea6a25ea51ad9f4bbc11ca2a
parent81884594ce15b7117d136380c8d0661b57ab558c (diff)
downloadgcc-c199f329bdc5dd12afb76f3a58dfb8fd094577d3.zip
gcc-c199f329bdc5dd12afb76f3a58dfb8fd094577d3.tar.gz
gcc-c199f329bdc5dd12afb76f3a58dfb8fd094577d3.tar.bz2
Do not clear m_vr and bits in ipa_set_jf_unknown.
* ipa-prop.c (ipa_set_jf_unknown): Do not clear bits and m_vr. (detect_type_change_from_memory_writes): Remoe parameter JFUNC. (detect_type_change): Likewise. (detect_type_change_ssa): Likewise. (ipa_analyze_virtual_call_uses): Update. From-SVN: r279025
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/ipa-prop.c24
2 files changed, 16 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c83a06..ba64864 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2019-12-05 Jan Hubicka <hubicka@ucw.cz>
+
+ * ipa-prop.c (ipa_set_jf_unknown): Do not clear bits and m_vr.
+ (detect_type_change_from_memory_writes): Remoe parameter JFUNC.
+ (detect_type_change): Likewise.
+ (detect_type_change_ssa): Likewise.
+ (ipa_analyze_virtual_call_uses): Update.
+
2019-12-05 Sandra Loosemore <sandra@codesourcery.com>
* config/nios2/linux.h (LINK_EH_SPEC): Define.
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 9a51b29..547c2ed 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -512,8 +512,6 @@ static void
ipa_set_jf_unknown (struct ipa_jump_func *jfunc)
{
jfunc->type = IPA_JF_UNKNOWN;
- jfunc->bits = NULL;
- jfunc->m_vr = NULL;
}
/* Set JFUNC to be a copy of another jmp (to be used by jump function
@@ -768,8 +766,7 @@ param_type_may_change_p (tree function, tree arg, gimple *call)
/* Detect whether the dynamic type of ARG of COMP_TYPE has changed (before
callsite CALL) by looking for assignments to its virtual table pointer. If
- it is, return true and fill in the jump function JFUNC with relevant type
- information or set it to unknown. ARG is the object itself (not a pointer
+ it is, return true. ARG is the object itself (not a pointer
to it, unless dereferenced). BASE is the base of the memory access as
returned by get_ref_base_and_extent, as is the offset.
@@ -779,7 +776,6 @@ param_type_may_change_p (tree function, tree arg, gimple *call)
static bool
detect_type_change_from_memory_writes (ipa_func_body_info *fbi, tree arg,
tree base, tree comp_type, gcall *call,
- struct ipa_jump_func *jfunc,
HOST_WIDE_INT offset)
{
struct prop_type_change_info tci;
@@ -818,19 +814,17 @@ detect_type_change_from_memory_writes (ipa_func_body_info *fbi, tree arg,
if (walked >= 0 && !tci.type_maybe_changed)
return false;
- ipa_set_jf_unknown (jfunc);
return true;
}
/* Detect whether the dynamic type of ARG of COMP_TYPE may have changed.
- If it is, return true and fill in the jump function JFUNC with relevant type
- information or set it to unknown. ARG is the object itself (not a pointer
+ If it is, return true. ARG is the object itself (not a pointer
to it, unless dereferenced). BASE is the base of the memory access as
returned by get_ref_base_and_extent, as is the offset. */
static bool
detect_type_change (ipa_func_body_info *fbi, tree arg, tree base,
- tree comp_type, gcall *call, struct ipa_jump_func *jfunc,
+ tree comp_type, gcall *call,
HOST_WIDE_INT offset)
{
if (!flag_devirtualize)
@@ -842,7 +836,7 @@ detect_type_change (ipa_func_body_info *fbi, tree arg, tree base,
call))
return false;
return detect_type_change_from_memory_writes (fbi, arg, base, comp_type,
- call, jfunc, offset);
+ call, offset);
}
/* Like detect_type_change but ARG is supposed to be a non-dereferenced pointer
@@ -851,7 +845,7 @@ detect_type_change (ipa_func_body_info *fbi, tree arg, tree base,
static bool
detect_type_change_ssa (ipa_func_body_info *fbi, tree arg, tree comp_type,
- gcall *call, struct ipa_jump_func *jfunc)
+ gcall *call)
{
gcc_checking_assert (TREE_CODE (arg) == SSA_NAME);
if (!flag_devirtualize
@@ -865,7 +859,7 @@ detect_type_change_ssa (ipa_func_body_info *fbi, tree arg, tree comp_type,
build_int_cst (ptr_type_node, 0));
return detect_type_change_from_memory_writes (fbi, arg, arg, comp_type,
- call, jfunc, 0);
+ call, 0);
}
/* Callback of walk_aliased_vdefs. Flags that it has been invoked to the
@@ -2611,7 +2605,6 @@ ipa_analyze_virtual_call_uses (struct ipa_func_body_info *fbi,
class ipa_node_params *info = fbi->info;
if (SSA_NAME_IS_DEFAULT_DEF (obj))
{
- struct ipa_jump_func jfunc;
if (TREE_CODE (SSA_NAME_VAR (obj)) != PARM_DECL)
return;
@@ -2619,12 +2612,11 @@ ipa_analyze_virtual_call_uses (struct ipa_func_body_info *fbi,
index = ipa_get_param_decl_index (info, SSA_NAME_VAR (obj));
gcc_assert (index >= 0);
if (detect_type_change_ssa (fbi, obj, obj_type_ref_class (target),
- call, &jfunc))
+ call))
return;
}
else
{
- struct ipa_jump_func jfunc;
gimple *stmt = SSA_NAME_DEF_STMT (obj);
tree expr;
@@ -2635,7 +2627,7 @@ ipa_analyze_virtual_call_uses (struct ipa_func_body_info *fbi,
SSA_NAME_VAR (TREE_OPERAND (expr, 0)));
gcc_assert (index >= 0);
if (detect_type_change (fbi, obj, expr, obj_type_ref_class (target),
- call, &jfunc, anc_offset))
+ call, anc_offset))
return;
}