From patchwork Thu May 31 20:35:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aldy Hernandez X-Patchwork-Id: 162230 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 8081FB6FC3 for ; Fri, 1 Jun 2012 06:35:47 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1339101348; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=EFnCHms 3Y5LveFvR4VQsDYIldCs=; b=tJwEnogtdSgYX5XH6SVocEX9i3c46+srDptazMs 6NbgV25OeTU09usyK7vgW3NaqndNqz1YBF/L/CViTdXZNAlTLnxzhASKwQyEvTSu AU26yAloGYKnhHO5VcU1uMfEPMK+Fw2rx6iAV00l9jAucCoCQHsNuG+K+eWwTjuN zUGM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Rmj/n60R3SxVPr9N0RRy/IQhNU2vA7u5D9TjkuUUazlgOacJK0vBk6UuZw20Zl PVsma1p3c8ofMLabNCiR9x/6wjDuHWJEGArwEhtRGnkI3oex3iGH9g8nvtXoPdpv xF5/PZJB9tVCJtj5ia0eQ3EPpGc8v91ZPH1N2eirlmYZk=; Received: (qmail 21614 invoked by alias); 31 May 2012 20:35:43 -0000 Received: (qmail 21530 invoked by uid 22791); 31 May 2012 20:35:42 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, SPF_HELO_PASS, TW_TM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 May 2012 20:35:25 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4VKZP8v024150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 31 May 2012 16:35:25 -0400 Received: from houston.quesejoda.com (vpn-232-47.phx2.redhat.com [10.3.232.47]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q4VKZOEL007384; Thu, 31 May 2012 16:35:24 -0400 Message-ID: <4FC7D60C.1010308@redhat.com> Date: Thu, 31 May 2012 15:35:24 -0500 From: Aldy Hernandez User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Richard Guenther CC: gcc-patches Subject: [committed] check for flag_tm in block_in_transaction 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 As discussed earlier, I have moved the flag_tm check inside of block_in_transaction. Committed to trunk. * tree-ssa-loop-im.c (execute_sm): Do not check flag_tm. * gimple.h (block_in_transaction): Check for flag_tm. Index: tree-ssa-loop-im.c =================================================================== --- tree-ssa-loop-im.c (revision 188081) +++ tree-ssa-loop-im.c (working copy) @@ -2154,7 +2154,7 @@ execute_sm (struct loop *loop, VEC (edge fmt_data.orig_loop = loop; for_each_index (&ref->mem, force_move_till, &fmt_data); - if ((flag_tm && block_in_transaction (loop_preheader_edge (loop)->src)) + if (block_in_transaction (loop_preheader_edge (loop)->src) || !PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES)) multi_threaded_model_p = true; Index: gimple.h =================================================================== --- gimple.h (revision 188081) +++ gimple.h (working copy) @@ -1593,7 +1593,7 @@ gimple_set_has_volatile_ops (gimple stmt static inline bool block_in_transaction (basic_block bb) { - return bb->flags & BB_IN_TRANSACTION; + return flag_tm && bb->flags & BB_IN_TRANSACTION; } /* Return true if STMT is in a transaction. */