From patchwork Thu Jun 29 05:16:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9815955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 316A860365 for ; Thu, 29 Jun 2017 05:19:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BD77280DE for ; Thu, 29 Jun 2017 05:19:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20AC5285D3; Thu, 29 Jun 2017 05:19:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDCBA280DE for ; Thu, 29 Jun 2017 05:19:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbdF2FTF (ORCPT ); Thu, 29 Jun 2017 01:19:05 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35230 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbdF2FTF (ORCPT ); Thu, 29 Jun 2017 01:19:05 -0400 Received: by mail-wm0-f66.google.com with SMTP id u23so342843wma.2 for ; Wed, 28 Jun 2017 22:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VmBaiBAP6SNw1ZsF4jLOW1PM3URfl4Lg+LCFVFvuqW8=; b=H4/msN6HIVfQRghcXEM0EKwRj4IGHtXrIBFxURLEMwTq352yN1XtIkEun/FDw89Xy+ yJ7fd6/m2HvtIKRLcwgkPl8j5QFooqQEm++VdfkXUR99atb8NRZulRr7fi/VSRPghmNS 2KHYej6AAB8E1I9Lgq+VXnbldFeO/meM5p5lCV2CrNN+0fPqYpyMNLbJLI88FyGPHGj7 Fi5oCZZatPcaPZ/LkvnC7Ad/QZ8OHOdYR9mU3sGbmLh5dlwj2S91BjhtqE+NNoa8+vnD 1XCPNAJrgInTKonTy1O9rlhG0Dq2sWNiaUAuK2CkGZ/7FlEEoHFmvVLOeCSnTh3jnJ/c Sj4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VmBaiBAP6SNw1ZsF4jLOW1PM3URfl4Lg+LCFVFvuqW8=; b=FBtNxJN7/Y2Lcnl29pNhLzSZAk9KV3MC+aNHSmdh0RTG3G7RkypSF1ShZIwl3CBdGN dKpW0RaM6djAooqQAKDJLcEg1dq5IbQnZkEtmauBFcwNbygEICHB7FsHZZm0nAO5DmQT n7eoMC2XOAQftTuJ+obAinhlz9u+M8aX40cndMrnxLW2b3R31cCfcyPg6Ljka2bMT576 QZbla4Xh2CfPVBvF5QD0p1hqUUBA1hAkcAG44afbyIn3//0w7WsFILr1S8vkIinUGnrX m234aSjrhjCaAtfVOH8HNOPmld8O+J1HT5LbhrvmRXT2ysHYjBtQTCGT5vRKnU2NOmRf y3VQ== X-Gm-Message-State: AKS2vOx7/R8NkAFWIvRuwQ4JXXMHUmRzLTM8kMrGcuc803i4HJJmSHvo q4mXs+KnIRhq+5vTIvQ= X-Received: by 10.80.173.231 with SMTP id b36mr312263edd.110.1498713543461; Wed, 28 Jun 2017 22:19:03 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:837:f300:1816:df24:7b15:fb23]) by smtp.gmail.com with ESMTPSA id z58sm132566edb.50.2017.06.28.22.19.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 22:19:02 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Christopher Li , Luc Van Oostenryck Subject: [PATCH 6/7] diet: squeeze struct symbol's members Date: Thu, 29 Jun 2017 07:16:45 +0200 Message-Id: <20170629051646.35988-7-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170629051646.35988-1-luc.vanoostenryck@gmail.com> References: <20170629051646.35988-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP struct symbol::arguments is only used for functions, while struct symbol::initializer is never used for functions. Put both of them in an union in order to make the structure a bit more lightweight. Signed-off-by: Luc Van Oostenryck --- symbol.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/symbol.h b/symbol.h index 1bedc75c3..d8733e99f 100644 --- a/symbol.h +++ b/symbol.h @@ -175,12 +175,14 @@ struct symbol { transparent_union:1; struct expression *array_size; struct ctype ctype; - struct symbol_list *arguments; struct statement *stmt; + union { + struct symbol_list *arguments; + struct expression *initializer; + }; struct symbol_list *symbol_list; struct statement *inline_stmt; struct symbol_list *inline_symbol_list; - struct expression *initializer; struct entrypoint *ep; struct symbol *definition; };