From patchwork Thu Jan 16 05:08:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1224007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-517483-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=UYk1YnYg; dkim=pass (2048-bit key; unprotected) header.d=marvell.com header.i=@marvell.com header.a=rsa-sha256 header.s=pfpt0818 header.b=F57vWfPb; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ysg95hgbz9sPW for ; Thu, 16 Jan 2020 16:09:07 +1100 (AEDT) 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:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=rLs0KYckuH338GKffjM0my0HyLQ30dyadW6qr5RTQVv+HB9cjI Rnb2bN8AuCXbtJr5LsRk2HYUg6nhfOPk2b57qQ3DZkQAweCf7FcRkMV2j6i6uYrP KxqnJ8Dn//0pPcJjlsGow3A2xI2Fmsx3NsNCJCLU8/VdJgEGGQPY+Ey78= 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:cc:subject:date:message-id:mime-version:content-type; s= default; bh=3NtE96FznR+RvRRCeo2Y4yb/frg=; b=UYk1YnYgFT056IdKIlzi WH5mt1PIefQDo5ef2Ppsd2DeVrfLAm0FJw+r7Nem1YHgmjOj06nieZWuL3ncU9iN kcRWhKfn8c7J7s84196wZrOKD+RKRcRWgg5QJQlvMDioO3CclBfzKruuEGEy5SpA NBKDt8v8v5eztOn1BPlnHko= Received: (qmail 73787 invoked by alias); 16 Jan 2020 05:08:58 -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 73777 invoked by uid 89); 16 Jan 2020 05:08:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx0b-0016f401.pphosted.com Received: from mx0a-0016f401.pphosted.com (HELO mx0b-0016f401.pphosted.com) (67.231.148.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Jan 2020 05:08:56 +0000 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00G5593C021435 for ; Wed, 15 Jan 2020 21:08:54 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=i+i9nwFCAjIs9Zmn91d2BQfpRF9Ww8ZWc9NBokZ0V20=; b=F57vWfPbURuejOYSHgCUR5PQb0Bp7xE8ky6wJflEsPv1Xzotq6u5WZSoOVFoRyM21uRT ad0iKfRIV34JrooDnrykE8zjNKX1HrgNOshi6WDJHYjpUtIaWSXTHu8ZQHPsDFuB1mPU 0aVi1CLebo4OqAEbn4k6ww3K2okGfIscFZIjAtTke1oOXHxdM8kfZwMs2e02zXCG3HCm PBhFeCB+NxAPu/4MBXw76OSlx68Jz/sNWArRLSIa6uVPMy2apc0YXDf9dgjheBMMuUxj J96pAzOYXbl0tgfUItFRNHULRV9bB15ZtdGNJsnvyXuhbLkFAyHj7/8dM+IREK2Oqma5 UQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2xhc6sre9x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jan 2020 21:08:54 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 Jan 2020 21:08:53 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 15 Jan 2020 21:08:53 -0800 Received: from linux.pinskiwright.org.com (unknown [10.104.47.220]) by maili.marvell.com (Postfix) with ESMTP id EEA663F7040; Wed, 15 Jan 2020 21:08:52 -0800 (PST) From: To: CC: Andrew Pinski Subject: [PATCH 1/2] Fix uninitialized field in expand_operand. Date: Wed, 15 Jan 2020 21:08:48 -0800 Message-ID: <1579151329-6088-1-git-send-email-apinski@marvell.com> MIME-Version: 1.0 From: Andrew Pinski Commit g:f96bf49a0 added the target field to expand_operand. But it leaves it uninitialized when doing a full initialization inside create_expand_operand. This fixes the problem and improves the code generation inside create_expand_operand too. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. ChangeLog: * optabs.h (create_expand_operand): Initialize target field also. Change-Id: Ib653fbfbb2b0709970db87fb94de14b59758bc6c --- gcc/optabs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/optabs.h b/gcc/optabs.h index 07bdc56586e..5bd19503a0a 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -78,6 +78,7 @@ create_expand_operand (class expand_operand *op, { op->type = type; op->unsigned_p = unsigned_p; + op->target = 0; op->unused = 0; op->mode = mode; op->value = value; From patchwork Thu Jan 16 05:08:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1224008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-517484-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=Ux/Z7Xap; dkim=pass (2048-bit key; unprotected) header.d=marvell.com header.i=@marvell.com header.a=rsa-sha256 header.s=pfpt0818 header.b=hzRlyNSG; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47ysgK2Jthz9sPW for ; Thu, 16 Jan 2020 16:09:17 +1100 (AEDT) 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:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=SAybQvcmw8k42RTA fFtutl5lOzxte5xujl4VivJYH5bfyIN/l7mhY1hjehxRR5Kw1C4RaQL8cuutEqvY B64efsrh9fTKbq4aKxlSxvjgLvRkrlz6AttTIRw4bzxQ2HV+p8BSQLEyCbykmkvd Eu/wrFjRMkdX2YJt38WKZ+0XuI0= 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:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=2OBfIy9GFUHrXr+Cp7rjCh hOmRQ=; b=Ux/Z7XapyMzBVuKik2ZzoAfyWHEZz9vjXRuer/7LbC0P9zzOTPbWDC Iw2QmzhOMpfdnmY7VDSljQ7aTYyS1C2TWr67eWRMbLgcaE2MUz6kcD0yV/akPdH8 ZQsNzymytBULjPyjBmOPZIU4HQYAk7PW2JeN/Mr0b7w7b5onseVnM= Received: (qmail 74562 invoked by alias); 16 Jan 2020 05:09:04 -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 74463 invoked by uid 89); 16 Jan 2020 05:09:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1544 X-HELO: mx0b-0016f401.pphosted.com Received: from mx0a-0016f401.pphosted.com (HELO mx0b-0016f401.pphosted.com) (67.231.148.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Jan 2020 05:09:02 +0000 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00G55KMv021488 for ; Wed, 15 Jan 2020 21:09:01 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=9CPF7uopQBqccQQUubkN3iu8YIzviZrAtA9qLd9gSiY=; b=hzRlyNSGTEdtWuiZ/znrSVMrQZO8EWCgGst0qg/Pb1XwDJdqNXNeaYLzefdxtQ3Y+RPo xHiqgicOk9bnfgx+z9zJmibzoyaSSiysD2wBbGZAx5vf10fi/6W+BgPzDXHJf7MEwUum tD0bdbW/70f9qOqU73FPcK//qfOkyqjrc/uz5bPuZDl4al8FYXDbvqqGRRagraqHzETK 6XdUSBlfRt7V5DKDcqPRioddvvUD12I29r/uFip+mn/k3jJ1/TRbQp9qZpDczjFmKW4z Sh9jSeVQOUJMOhx8RNVeT5OWbBwWiI+OWY5ukE62MoWjzDr1cX67AcWLGwLltBKE/yTU rQ== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 2xhc6srea8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jan 2020 21:09:01 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 15 Jan 2020 21:08:59 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 15 Jan 2020 21:08:59 -0800 Received: from linux.pinskiwright.org.com (unknown [10.104.47.220]) by maili.marvell.com (Postfix) with ESMTP id 087BC3F703F; Wed, 15 Jan 2020 21:08:58 -0800 (PST) From: To: CC: Andrew Pinski Subject: [PATCH 2/2] Uninitialized padding in struct _dep. Date: Wed, 15 Jan 2020 21:08:49 -0800 Message-ID: <1579151329-6088-2-git-send-email-apinski@marvell.com> In-Reply-To: <1579151329-6088-1-git-send-email-apinski@marvell.com> References: <1579151329-6088-1-git-send-email-apinski@marvell.com> MIME-Version: 1.0 From: Andrew Pinski In struct _dep, there is an implicit padding of 4bits. This bit-field padding is uninitialized when init_dep_1 is being called. This means we access uninitialized memory but never use it for anything. Adding an unused bit-field field and initializing it in init_dep_1 will improve code generation also as we initialize the whole 32bits now rather than just part of it. OK? Bootstrapped and tested on x86_64-linux-gnu. Thanks, Andrew Pinski ChangeLog: * sched-int.h (_dep): Add unused bit-field field for the padding. * sched-deps.c (init_dep_1): Init unused field. Change-Id: I27000323e728f8a73189426e0b9a98c5235b8c55 --- gcc/sched-deps.c | 1 + gcc/sched-int.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 9182aba5588..331af5ffdb3 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -101,6 +101,7 @@ init_dep_1 (dep_t dep, rtx_insn *pro, rtx_insn *con, enum reg_note type, ds_t ds DEP_NONREG (dep) = 0; DEP_MULTIPLE (dep) = 0; DEP_REPLACE (dep) = NULL; + dep->unused = 0; } /* Init DEP with the arguments. diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 833b552a340..a847f876e65 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -238,6 +238,8 @@ struct _dep /* Cached cost of the dependency. Make sure to update UNKNOWN_DEP_COST when changing the size of this field. */ int cost:20; + + unsigned unused:4; }; #define UNKNOWN_DEP_COST ((int) ((unsigned int) -1 << 19))