Hi,

In testcase cgraph_edge.C, inline_edge_summary in estimate_function_body_sizes fails because there is no callgraph edge representing the stmt. The edge was removed in ipa_tm_transform_calls_redirect after transforming to indirect call.

Honza: I have added you to this email since Richard was not sure about edge removal.

Patrick.

gcc/
2011-12-06  Patrick Marlier  <patrick.marl...@gmail.com>

        * trans-mem.c (ipa_tm_transform_calls_redirect): Do not remove
        edge.

testsuite/
2011-12-06  Patrick Marlier  <patrick.marl...@gmail.com>

        * g++.dg/tm/cgraph_edge.C: New test.
Index: trans-mem.c
===================================================================
--- trans-mem.c (revision 181892)
+++ trans-mem.c (working copy)
@@ -4481,7 +4481,6 @@ ipa_tm_transform_calls_redirect (struct cgraph_nod
        {
          *need_ssa_rename_p |=
            ipa_tm_insert_gettmclone_call (node, region, gsi, stmt);
-         cgraph_remove_edge (e);
          return;
        }
 
Index: testsuite/g++.dg/tm/cgraph_edge.C
===================================================================
--- testsuite/g++.dg/tm/cgraph_edge.C   (revision 0)
+++ testsuite/g++.dg/tm/cgraph_edge.C   (revision 0)
@@ -0,0 +1,33 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm -O3" }
+
+template<typename _InputIterator, typename _Distance>  inline void 
advance(_InputIterator& __i, _Distance __n)
+  {
+    if (__n > 0) 
+      while (__n--)
+        --__i;
+    else  
+      --__i;
+  }
+
+void  _Rb_tree_increment ();
+
+template<typename _Tp> struct _Rb_tree_iterator 
+  {
+    typedef _Rb_tree_iterator<_Tp> iterator;
+
+    iterator& operator--()
+      {
+        _Rb_tree_increment();
+      }
+  };
+
+void update ()
+  {
+    _Rb_tree_iterator<int>::iterator it;
+    __transaction_relaxed
+      {
+        advance (it, 0);
+      }
+  }
+

Reply via email to