ipa-prop.c (ipa_intraprocedural_devirtualization): Remove.
authorJan Hubicka <hubicka@ucw.cz>
Fri, 26 Sep 2014 01:49:40 +0000 (03:49 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 26 Sep 2014 01:49:40 +0000 (01:49 +0000)
* ipa-prop.c (ipa_intraprocedural_devirtualization): Remove.
* ipa-prop.h (ipa_intraprocedural_devirtualization): Remove.
* tree-ssa-prop.c (eliminate_dom_walker::before_dom_children):
Remove.

From-SVN: r215628

gcc/ChangeLog
gcc/ipa-prop.c
gcc/ipa-prop.h
gcc/tree-ssa-pre.c

index 85dd75050eaff8b803f3c71bba93b0b5c7e65aee..e19ba1f48352a0c5ffe64e2e4bd1f95af63f8bf5 100644 (file)
@@ -1,3 +1,10 @@
+2014-09-25  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-prop.c (ipa_intraprocedural_devirtualization): Remove.
+       * ipa-prop.h (ipa_intraprocedural_devirtualization): Remove.
+       * tree-ssa-prop.c (eliminate_dom_walker::before_dom_children):
+       Remove.
+
 2014-09-25  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-utils.h (subbinfo_with_vtable_at_offset, type_all_derivations_known_p,
index 36949e32709649f971ae6ff79ac997fa1930ecfe..34d4c0207d1a36e588eeb161c999fd75706ee665 100644 (file)
@@ -2566,36 +2566,6 @@ ipa_analyze_node (struct cgraph_node *node)
   pop_cfun ();
 }
 
-/* Given a statement CALL which must be a GIMPLE_CALL calling an OBJ_TYPE_REF
-   attempt a type-based devirtualization.  If successful, return the
-   target function declaration, otherwise return NULL.  */
-
-tree
-ipa_intraprocedural_devirtualization (gimple call)
-{
-  tree binfo, token, fndecl;
-  struct ipa_jump_func jfunc;
-  tree otr = gimple_call_fn (call);
-
-  jfunc.type = IPA_JF_UNKNOWN;
-  compute_known_type_jump_func (OBJ_TYPE_REF_OBJECT (otr), &jfunc,
-                               call, obj_type_ref_class (otr));
-  if (jfunc.type != IPA_JF_KNOWN_TYPE)
-    return NULL_TREE;
-  binfo = ipa_binfo_from_known_type_jfunc (&jfunc);
-  if (!binfo)
-    return NULL_TREE;
-  token = OBJ_TYPE_REF_TOKEN (otr);
-  fndecl = gimple_get_virt_method_for_binfo (tree_to_uhwi (token),
-                                            binfo);
-#ifdef ENABLE_CHECKING
-  if (fndecl)
-    gcc_assert (possible_polymorphic_call_target_p
-                 (otr, call, cgraph_node::get (fndecl)));
-#endif
-  return fndecl;
-}
-
 /* Update the jump function DST when the call graph edge corresponding to SRC is
    is being inlined, knowing that DST is of type ancestor and src of known
    type.  */
index a6db8f67ede54346c293711560f680dec2212ba7..27a1697d082e21f3379ff8a8e1169f2997b87c89 100644 (file)
@@ -587,7 +587,6 @@ tree ipa_get_indirect_edge_target (struct cgraph_edge *ie,
                                   vec<ipa_agg_jump_function_p> );
 struct cgraph_edge *ipa_make_edge_direct_to_target (struct cgraph_edge *, tree);
 tree ipa_binfo_from_known_type_jfunc (struct ipa_jump_func *);
-tree ipa_intraprocedural_devirtualization (gimple);
 tree ipa_impossible_devirt_target (struct cgraph_edge *, tree);
 
 /* Functions related to both.  */
index 235846ff927a6c017a26c8f439082b4866dd1bf2..cbbd422043329080ff12aafda0f74b15cac19e26 100644 (file)
@@ -4314,8 +4314,6 @@ eliminate_dom_walker::before_dom_children (basic_block b)
                  gimple_call_set_fndecl (stmt, fn);
                  gimple_set_modified (stmt, true);
                }
-             else
-               gcc_assert (!ipa_intraprocedural_devirtualization (stmt));
            }
        }