2013-12-14 Jan Hubicka <jh@suse.cz>
+ PR ipa/59265
+ * ipa-prop.c (ipa_analyze_call_uses): Skip already
+ devirtualized calls.
+
+2013-12-14 Jan Hubicka <jh@suse.cz>
PR middle-end/58477
* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Skip clobbers.
struct param_analysis_info *parms_ainfo, gimple call)
{
tree target = gimple_call_fn (call);
+ struct cgraph_edge *cs;
- if (!target)
+ if (!target
+ || (TREE_CODE (target) != SSA_NAME
+ && !virtual_method_call_p (target)))
+ return;
+
+ /* If we previously turned the call into a direct call, there is
+ no need to analyze. */
+ cs = cgraph_edge (node, call);
+ if (cs && !cs->indirect_unknown_callee)
return;
if (TREE_CODE (target) == SSA_NAME)
ipa_analyze_indirect_call_uses (node, info, parms_ainfo, call, target);
+2013-12-14 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/59265
+ g++.dg/torture/pr59265.C: New testcase.
+
2013-12-15 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/vect/vect-nop-move.c (foo32x2_be): Call
--- /dev/null
+// { dg-do compile }
+// { dg-options "-fprofile-use -std=gnu++11" }
+
+class A {
+ int m_fn1() const;
+ unsigned m_fn2() const;
+};
+class B {
+public:
+ virtual void m_fn1();
+};
+class C final : B {
+ C();
+ virtual void m_fn2() { m_fn1(); }
+};
+int a;
+unsigned A::m_fn2() const {
+ if (m_fn1())
+ return 0;
+ a = m_fn2();
+}
+C::C() {}