Patchwork 19/n: trans-mem: middle end/misc patches (LAST PATCH)

login
register
mail settings
Submitter Aldy Hernandez
Date Nov. 7, 2011, 5:43 p.m.
Message ID <4EB818AD.3080708@redhat.com>
Download mbox | patch
Permalink /patch/124154/
State New
Headers show

Comments

Aldy Hernandez - Nov. 7, 2011, 5:43 p.m.
> Do not push new_version->lowered setting into the core routine but keep
> it at the callers.

Well, why didn't you say so?  :).  That can't be hard :).

I'm testing this.

How does it look?
Aldy Hernandez - Nov. 7, 2011, 8:38 p.m.
On 11/07/11 09:43, Aldy Hernandez wrote:
>
>> Do not push new_version->lowered setting into the core routine but keep
>> it at the callers.
>
> Well, why didn't you say so? :). That can't be hard :).
>
> I'm testing this.
>
> How does it look?

rth approved this off-list.  I have just committed.

Richi, if you have any issues (with this patch, or anything else, please 
let me know).

Thanks.

Patch

Index: ChangeLog.tm-merge
===================================================================
--- ChangeLog.tm-merge	(revision 181098)
+++ ChangeLog.tm-merge	(working copy)
@@ -67,8 +67,7 @@ 
 	(struct cgraph_local_info): Add tm_may_enter_irr.
 	(cgraph_copy_node_for_versioning): Declare.
 	* cgraphunit.c (cgraph_copy_node_for_versioning): Export;
-	copy analyzed from old version. Move setting lowered to true from ...
-	(cgraph_function_versioning): ... here.
+	copy analyzed from old version.
 	* combine.c (distribute_notes): Handle REG_TM notes.
 	* common.opt: Add -fgnu-tm.
 	* crtstuff.c (__TMC_LIST__, __TMC_END__): New.
Index: cgraphunit.c
===================================================================
--- cgraphunit.c	(revision 181098)
+++ cgraphunit.c	(working copy)
@@ -2294,7 +2294,6 @@  cgraph_copy_node_for_versioning (struct 
    new_version->rtl = old_version->rtl;
    new_version->reachable = true;
    new_version->count = old_version->count;
-   new_version->lowered = true;
 
    for (e = old_version->callees; e; e=e->next_callee)
      if (!bbs_to_copy
@@ -2390,6 +2389,7 @@  cgraph_function_versioning (struct cgrap
   DECL_VIRTUAL_P (new_version_node->decl) = 0;
   new_version_node->local.externally_visible = 0;
   new_version_node->local.local = 1;
+  new_version_node->lowered = true;
 
   /* Update the call_expr on the edges to call the new version node. */
   update_call_expr (new_version_node);
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 181098)
+++ trans-mem.c	(working copy)
@@ -4219,6 +4219,7 @@  ipa_tm_create_version (struct cgraph_nod
     DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl));
 
   new_node = cgraph_copy_node_for_versioning (old_node, new_decl, NULL, NULL);
+  new_node->lowered = true;
   new_node->tm_clone = 1;
   get_cg_data (old_node)->clone = new_node;