From patchwork Mon Nov 14 23:21:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 20088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2415508wru; Mon, 14 Nov 2022 15:22:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4dTlfyGp1JE1mRO66xo2cx4Ua5J8jEpRxIbbLCK/cKFdvJQGChmyzshT1Wqcfmos+a+BEM X-Received: by 2002:a17:906:99d2:b0:7af:bc8:da37 with SMTP id s18-20020a17090699d200b007af0bc8da37mr3457887ejn.18.1668468137920; Mon, 14 Nov 2022 15:22:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668468137; cv=none; d=google.com; s=arc-20160816; b=U41z68zjpyxgUb1IJFiohP5pXDzebbwoVQMoDtZZAb5OdLxbQEe9PND2lcmxjrhKH0 1JP8KYmooG30Q1D8zbo9SrTvsnp+arAwKkfEwJuTaFrqOV8fh4a/zl5YW75lTjHTWi1i LU8N3bDCbfLIs6r89c8iATDWzHLdoYfBtum28YNG7piuDcnhvE025ZPn4e8TXXdm7eQY LpUwZ71dY4selwsE9eD7f7G/bi3ypEtomfIWmSQPy+JGZVNXkmnIg/9fQg/MT+rhGtIa WfPlMlh6GXKU1nh6UA82BFsIegUel+StvXxCdmyzVQN2Vm433QDRtklZxtPpBlhLUOIn erVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:subject:cc:to:from:date:dkim-signature:dmarc-filter :delivered-to; bh=IZy8iaPianp9Co3wY67elQnQ0g+Sx1Up3SNfQkVrs6U=; b=lAgYM690rQcLcvdjHVXfOQNlIyTtLOA8r4W8oUXI/yFq+lvfN9D2GC68YTnp1c3TN0 F1v0DhSLCb3KajgK8xpJxJmmGlrl4wij8otqyagHIxz9Qi/jPrend7qvqvGFUvcMI194 /O4NefpLjNNC6eRLVx96Uc0MQTotSD7IHvuc1FKOSP+HktU1MHumpulMdnDotdcO3YBH ifosGlkAQdHwqvxueCttdvAcjlUqlP5nF8nTjCGBBT2/WFc5FMrtdGX0HsEI+9liEJPJ JjEgAJVDnaMvtO2wygEieRenmvWtL7H8dCUiM/v5L85oNwQD3aKWfF+GHyARcHdTP3f9 3iUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=IbflOQRs; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id ho32-20020a1709070ea000b0077082e784easi10961394ejc.957.2022.11.14.15.22.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 15:22:17 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@embecosm.com header.s=google header.b=IbflOQRs; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D8458385703A for ; Mon, 14 Nov 2022 23:22:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id AFAED3858D32 for ; Mon, 14 Nov 2022 23:21:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AFAED3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-lj1-x235.google.com with SMTP id d20so15334556ljc.12 for ; Mon, 14 Nov 2022 15:21:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:user-agent:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=IZy8iaPianp9Co3wY67elQnQ0g+Sx1Up3SNfQkVrs6U=; b=IbflOQRsxT3HUGUfcLvSVPEZpjoerGhlCAzUaUOHleVsbiRpt8PWn4MxrmJ1vS4p7+ 5CRP3gtwS41v6iMztlFQ5uu/HR1fFzaJc8QHn/GVqIDqgI8fH2vSPvSh3e9ivW/vxGrB +IZrlrwlkHLoMSUWZaC07Uw5PIowhMFpatHx+6UJHJ0EOuJvcDPl5Vs7GKA0mNrCzf1A z5q6fBHL7NON0c1xdae9XZVgEdOYoCpY/vzcMoYQdGTs0bUxTLl8IgNOiJU4aOAQONRR 9BiM51r7OSSQCb05cqqru/8uflStcLx21iaguae3ggTEdp/KivXecXH1DVTqJVyNfZMu YP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IZy8iaPianp9Co3wY67elQnQ0g+Sx1Up3SNfQkVrs6U=; b=iDji/1ARzzqKOOArYw4Uy2tL5mpZk/6nDCt4OHWfXfFdGcWupgD/tWioUH/Z1V4m3N enGWQZPJ7YV/uIDlNZIRoa1HjxxYfVeikxONfPGS3ck11E5TvQKu0sCCN7lfdjhB4QH1 88Y0q8N5DX88Crd2X7GPFrVYKIbcN7RxGKJNIHMiBp8nojU1kQ70eCb+TKeGCvvJTfel t4qT8qsnSXerQs0VuYEIwOjxKPXBO5H8pKWJ+GgtCXm7uvSIEE3ftHfTJqQvecAYkL4P ekdPpj4WOXx8MZr3u+XeoS0OgpbQqfO7F/uAznx9mKqqzvtcN7mvNVaIYiPuQYE44Wnl 9UcA== X-Gm-Message-State: ANoB5pket8Ewayip4KE5UZ7l6/pld1RWdRWFhEuiYxW+v9FUYX3HZ0N5 LQI389V4hvTB9Emr/VhpaNDgC6YBPsKrh/45 X-Received: by 2002:a2e:8348:0:b0:26f:c670:4d97 with SMTP id l8-20020a2e8348000000b0026fc6704d97mr4757326ljh.262.1668468106122; Mon, 14 Nov 2022 15:21:46 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id f29-20020a05651c03dd00b0026e897e3236sm2223722ljp.6.2022.11.14.15.21.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2022 15:21:45 -0800 (PST) Date: Mon, 14 Nov 2022 23:21:41 +0000 (GMT) From: "Maciej W. Rozycki" To: gcc-patches@gcc.gnu.org cc: Vladimir Makarov Subject: [PATCH] ira: Remove duplicate `memset' over `full_costs' from `assign_hard_reg' Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749515645751023446?= X-GMAIL-MSGID: =?utf-8?q?1749515645751023446?= Remove duplicate clearing of `full_costs' made in `assign_hard_reg', which has been there since the beginning, i.e. commit 058e97ecf33a ("IRA has been merged into trunk"), . gcc/ * ira-color.cc (assign_hard_reg): Remove duplicate `memset' over `full_costs'. --- Hi, I find this fairly obvious, OK to apply? Maciej --- gcc/ira-color.cc | 1 - 1 file changed, 1 deletion(-) gcc-ira-assign-hard-reg-full-costs-dup.diff Index: gcc/gcc/ira-color.cc =================================================================== --- gcc.orig/gcc/ira-color.cc +++ gcc/gcc/ira-color.cc @@ -1961,7 +1961,6 @@ assign_hard_reg (ira_allocno_t a, bool r aclass = ALLOCNO_CLASS (a); class_size = ira_class_hard_regs_num[aclass]; best_hard_regno = -1; - memset (full_costs, 0, sizeof (int) * class_size); mem_cost = 0; memset (costs, 0, sizeof (int) * class_size); memset (full_costs, 0, sizeof (int) * class_size);