From patchwork Mon Oct 31 18:54:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Marlier X-Patchwork-Id: 122920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2DE6DB6F76 for ; Tue, 1 Nov 2011 05:55:02 +1100 (EST) Received: (qmail 3287 invoked by alias); 31 Oct 2011 18:54:58 -0000 Received: (qmail 3277 invoked by uid 22791); 31 Oct 2011 18:54:57 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Oct 2011 18:54:42 +0000 Received: by vwe42 with SMTP id 42so925628vwe.20 for ; Mon, 31 Oct 2011 11:54:42 -0700 (PDT) Received: by 10.52.91.5 with SMTP id ca5mr5537441vdb.9.1320087282000; Mon, 31 Oct 2011 11:54:42 -0700 (PDT) Received: from d01.cs.rochester.edu (d01.cs.rochester.edu. [128.151.67.209]) by mx.google.com with ESMTPS id dw3sm8487969vdb.16.2011.10.31.11.54.40 (version=SSLv3 cipher=OTHER); Mon, 31 Oct 2011 11:54:41 -0700 (PDT) Message-ID: <4EAEEEF0.3020006@gmail.com> Date: Mon, 31 Oct 2011 14:54:40 -0400 From: Patrick Marlier User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: GCC Patches CC: Aldy Hernandez , Richard Henderson , Torvald Riegel Subject: [trans-mem] Fix tm_pure not inlinable in tm_safe X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes the g++ pr45940-4 failure. I think it is due to the latest merge. Tested on i686. (I cannot test it yet on x86-64, I hope to get access to a 64 bit soon...) Patrick. 2011-10-31 Patrick Marlier * ipa-inline.c: Adjust how cannot_inline is set. Index: ipa-inline.c =================================================================== --- ipa-inline.c (revision 180705) +++ ipa-inline.c (working copy) @@ -285,14 +285,14 @@ inlinable = false; } /* TM pure functions should not get inlined if the outer function is - a TM safe function. */ + a TM safe function. ??? TM pure function could be inlined if waiver block + is implemented. */ else if (flag_tm && is_tm_pure (callee->decl) && is_tm_safe (e->caller->decl)) { e->inline_failed = CIF_UNSPECIFIED; - gimple_call_set_cannot_inline (e->call_stmt, true); - return false; + inlinable = false; } /* Don't inline if the callee can throw non-call exceptions but the caller cannot.