This is the mail archive of the
mailing list for the GCC project.
[PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, aldyh at redhat dot com
- Date: Wed, 30 Jul 2014 18:56:05 +0200
- Subject: [PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node
- Authentication-results: sourceware.org; auth=none
IPA-CP can wreck havoc to transactional memory support as described in
the summary of the PR in bugzilla. It seems the cause is that IPA-CP
clones of nodes created by trans-mem do not have their tm_clone flag
set. For release branches we have decided to simply disable IPA-CP of
trans-mem clones but for trunk we'd like to avoid this. I am not 100%
sure that just copying the flag is OK but it seems that it works for
the provided testcase and nobody from the trans-mem people has
commented in bugzilla for over a month. So I suggest we commit this
patch and wait and see if something breaks. Hopefully nothing will.
Bootstrapped and tested on x86_64-linux. OK for trunk?
2014-07-29 Martin Jambor <firstname.lastname@example.org>
* cgraphclones.c (cgraph_node::create_clone): Also copy tm_clone.
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c
index f097da8..c04b5c8 100644
@@ -423,6 +423,7 @@ cgraph_node::create_clone (tree decl, gcov_type gcov_count, int freq,
new_node->count = count;
new_node->frequency = frequency;
new_node->tp_first_run = tp_first_run;
+ new_node->tm_clone = tm_clone;
new_node->clone.tree_map = NULL;
new_node->clone.args_to_skip = args_to_skip;