From patchwork Wed Nov 20 17:27:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Suchanek X-Patchwork-Id: 292838 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1D7372C0126 for ; Thu, 21 Nov 2013 04:27:31 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=XKr LtkWJlablT/XBPHjJ75ep+hzlDQJvBIiYU2plsCjdkBa+c2aGWFd1lW5g8zYDORt aUha4wAEpHcSuCGt8D2ygXCbSPfguJv9+uRn7ieYsooknpfKdObFDsIcUKMHWw9h GipKVgwctRGB+R8+d7R9fx1lulUh9hCWHIU0d7h0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=3+4wqsB83 /5O7yYZTb4SWEkoqyc=; b=aqh64uSUoO7iOjtMzsBzMfwL1/WSZsvPz2kxspUPI AlxUaC6Z6fZV2YqjFLtXLrsi2i+CRawYluxMBIjyOidDVVM/YxV7ocu8yERQ1nRo Eck9Fhl+Jy+DH3g1MUKQGP2wTQzqLiD+HWkNQ8Uus6NqyArNlWcAN/24lxBEk7Zk g4= Received: (qmail 10772 invoked by alias); 20 Nov 2013 17:27:22 -0000 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 Received: (qmail 10761 invoked by uid 89); 20 Nov 2013 17:27:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.4 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: multi.imgtec.com Received: from Unknown (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Nov 2013 17:27:20 +0000 From: Robert Suchanek To: "gcc-patches@gcc.gnu.org" Subject: [PING][PATCH] LRA: check_rtl modifies RTL instruction stream Date: Wed, 20 Nov 2013 17:27:10 +0000 Message-ID: MIME-Version: 1.0 X-SEF-Processed: 7_3_0_01192__2013_11_20_17_27_12 Hi, I'm pinging for the review of a patch. Original post: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01608.html The attached patch is slightly modified as the indentation was incorrect and realised that after sending the email last time. If the patch is OK, could someone commit the patch? I do not have permission to do so. Regards, Robert 2013-11-13 Robert Suchanek * lra.c (lra): Set lra_in_progress before check_rtl call. * recog.c (insn_invalid_p): Add !lra_in_progress to prevent adding clobber regs when LRA is running diff --git a/gcc/lra.c b/gcc/lra.c index 1aea599..83d45b6 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -2238,6 +2238,10 @@ lra (FILE *f) init_insn_recog_data (); + /* We can not set up reload_in_progress because it prevents new + pseudo creation. */ + lra_in_progress = 1; + #ifdef ENABLE_CHECKING check_rtl (false); #endif @@ -2248,10 +2252,6 @@ lra (FILE *f) setup_reg_spill_flag (); - /* We can not set up reload_in_progress because it prevents new - pseudo creation. */ - lra_in_progress = 1; - /* Function remove_scratches can creates new pseudos for clobbers -- so set up lra_constraint_new_regno_start before its call to permit changing reg classes for pseudos created by this diff --git a/gcc/recog.c b/gcc/recog.c index c8594bb..5c0ec16 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -314,7 +314,9 @@ insn_invalid_p (rtx insn, bool in_group) clobbers. */ int icode = recog (pat, insn, (GET_CODE (pat) == SET - && ! reload_completed && ! reload_in_progress) + && ! reload_completed + && ! reload_in_progress + && ! lra_in_progress) ? &num_clobbers : 0); int is_asm = icode < 0 && asm_noperands (PATTERN (insn)) >= 0;