From 0a35513e4e73ec9c6f24e791d344308ad3ed030d Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Tue, 8 Nov 2011 11:13:41 +0000 Subject: Merge from transactional-memory branch. From-SVN: r181154 --- gcc/ipa-inline.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/ipa-inline.c') diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 31c88e50..3dadf8d 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -284,6 +284,14 @@ can_inline_edge_p (struct cgraph_edge *e, bool report) e->inline_failed = CIF_EH_PERSONALITY; inlinable = false; } + /* TM pure functions should not get inlined if the outer function is + a TM safe function. */ + else if (is_tm_pure (callee->decl) + && is_tm_safe (e->caller->decl)) + { + e->inline_failed = CIF_UNSPECIFIED; + inlinable = false; + } /* Don't inline if the callee can throw non-call exceptions but the caller cannot. FIXME: this is obviously wrong for LTO where STRUCT_FUNCTION is missing. -- cgit v1.1