From patchwork Mon Jun 16 15:05:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 31972 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C93B220E7A for ; Mon, 16 Jun 2014 15:06:12 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rd18sf33190661iec.2 for ; Mon, 16 Jun 2014 08:06:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:message-id:date:from:user-agent:mime-version:to:cc :subject:x-original-sender:x-original-authentication-results :content-type; bh=2V6ULEVTGp/VmNCNLomYLPBb2D06uFLSbJ3uma7Jjig=; b=kofL6NWFHssRzJeQYGCW8g4tEYx8Ok63fFWRHIThFWqeXQSoEHpa7ue6VfnJ9rq3lj 1Cf1sTS7hJue9I400giMTBq1v48z2Zb70+DRjEMCafkf/M6PgdT1KlHJipRXX0hcNEJ1 kWXvu4wIuvdzVj23bT608C8aG6+RsTnz9EqyCyyS42IGZJR2rv4SzptOfzw2jp/hZA8E xTWdrmb6wrGZ4k9eEBbHJfTQWh0zOx3aPruE+x+Tgyb+LThVvzPM4sj3l3792MNcThWr OWnZB+THHRe29cxIvZnfuWAd2T5RAEYtcEuOgMkLyfOyWEiG1QaaFthQ4Q3IwHHAyph6 shnw== X-Gm-Message-State: ALoCoQkE+eyYT9Lwp0+AxooiPk+GjkGTTdDG8vtIjDBA6QHczPPx/eEkTBko1+3oQo1FAX9FSw1h X-Received: by 10.42.247.8 with SMTP id ma8mr3141895icb.30.1402931172277; Mon, 16 Jun 2014 08:06:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.39 with SMTP id 36ls4363592qgm.75.gmail; Mon, 16 Jun 2014 08:06:12 -0700 (PDT) X-Received: by 10.52.53.69 with SMTP id z5mr1372009vdo.42.1402931172194; Mon, 16 Jun 2014 08:06:12 -0700 (PDT) Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com [2607:f8b0:400c:c03::22c]) by mx.google.com with ESMTPS id tg13si4190203vdb.99.2014.06.16.08.06.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 08:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22c as permitted sender) client-ip=2607:f8b0:400c:c03::22c; Received: by mail-vc0-f172.google.com with SMTP id hy10so5091663vcb.31 for ; Mon, 16 Jun 2014 08:06:11 -0700 (PDT) X-Received: by 10.52.25.130 with SMTP id c2mr5292958vdg.27.1402931171061; Mon, 16 Jun 2014 08:06:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp141179vcb; Mon, 16 Jun 2014 08:06:10 -0700 (PDT) X-Received: by 10.66.142.199 with SMTP id ry7mr25114729pab.10.1402931170015; Mon, 16 Jun 2014 08:06:10 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id zc3si11207393pbc.176.2014.06.16.08.06.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jun 2014 08:06:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-370368-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 28894 invoked by alias); 16 Jun 2014 15:05:57 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 28881 invoked by uid 89); 16 Jun 2014 15:05:56 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: collaborate-mta1.arm.com Received: from fw-tnat.austin.arm.com (HELO collaborate-mta1.arm.com) (217.140.110.23) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 16 Jun 2014 15:05:55 +0000 Received: from [10.1.209.147] (e104577-lin.cambridge.arm.com [10.1.209.147]) by collaborate-mta1.arm.com (Postfix) with ESMTPS id 9E9BC13F7F3; Mon, 16 Jun 2014 10:05:53 -0500 (CDT) Message-ID: <539F07D0.3040609@arm.com> Date: Mon, 16 Jun 2014 16:05:52 +0100 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org ;" CC: Jakub Jelinek , Richard Biener Subject: [Patch LRA] PR 61522 - Handle NULL targetm.spill_class X-IsSubscribed: yes X-Original-Sender: ramana.radhakrishnan@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22c as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi, This handles NULL targetm.spill_class in assign_by_spills. This showed up as a segfault during a build for arm-none-linux-gnueabi(hf). Fix pre-approved by richi on IRC , verified that bootstrap continues from where things broke further on a tree (that reverts 211600 which is the next breakage causing commit on arm-none-linux-gnueabihf) I'll apply this in about 45 minutes when I get back to my desk if no one objects. regards Ramana 2014-06-16 Ramana Radhakrishnan PR rtl-optimization/61522 * lra-assigns.c (assign_by_spills): Handle NULL targetm.spill_class. diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index cea4c33..5de18e1 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1420,7 +1420,7 @@ assign_by_spills (void) alternatives of insns containing the pseudo. */ bitmap_set_bit (&changed_pseudo_bitmap, regno); } - else + else if (targetm.spill_class) { enum reg_class rclass = lra_get_allocno_class (regno); enum reg_class spill_class; @@ -1438,12 +1438,12 @@ assign_by_spills (void) if (hard_regno < 0) regno_allocno_class_array[regno] = rclass; else - { - setup_reg_classes - (regno, spill_class, spill_class, spill_class); - assign_hard_regno (hard_regno, regno); - bitmap_set_bit (&changed_pseudo_bitmap, regno); - } + { + setup_reg_classes + (regno, spill_class, spill_class, spill_class); + assign_hard_regno (hard_regno, regno); + bitmap_set_bit (&changed_pseudo_bitmap, regno); + } } } }