From patchwork Wed Nov 4 13:27:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erick Ochoa X-Patchwork-Id: 1393908 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CR6sP0X3qz9sT6 for ; Thu, 5 Nov 2020 00:27:50 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 16362385781D; Wed, 4 Nov 2020 13:27:48 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by sourceware.org (Postfix) with ESMTPS id 9F952385780C for ; Wed, 4 Nov 2020 13:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9F952385780C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=erick.ochoa@theobroma-systems.com Received: from [185.143.182.1] (port=5311 helo=Martins-MacBook-Air.local) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1kaIp8-0004bT-Ip; Wed, 04 Nov 2020 14:27:38 +0100 To: GCC Patches From: Erick Ochoa Subject: [0/7] LTO Dead field elimination and field reordering Message-ID: <55848c6d-a3bd-f870-cd46-c27b01160bd5@theobroma-systems.com> Date: Wed, 4 Nov 2020 14:27:38 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:78.0) Gecko/20100101 Thunderbird/78.3.3 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_ABUSEAT, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , Cc: Philipp Tomsich , =?utf-8?q?Chris?= =?utf-8?q?toph_M=C3=BCllner?= Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, I've been working on several implementations of data layout optimizations for GCC, and I am again kindly requesting for a review of the type escape based dead field elimination and field reorg. This patchset is organized in the following way: * Adds a link-time warning if dead fields are detected * Allows for the dead-field elimination transformation to be applied * Reorganizes fields in structures. * Adds some documentation * Gracefully does not apply transformation if unknown syntax is detected. * Adds a heuristic to handle void* casts I have tested this transformations as extensively as I can. The way to trigger these transformations are: -fipa-field-reorder and -fipa-type-escape-analysis Having said that, I welcome all criticisms and will try to address those criticisms which I can. Please let me know if you have any questions or comments, I will try to answer in a timely manner. There has been some initial discussion on the GCC mailing list but I'm submitting the patches to the patches mailing list now. Some of the initial criticisms mentioned on the GCC mailing list previously will be addressed in the following days, and I believe there is definitely enough time to address them all during Stage 1. I had to add one last commit to account to some differences in the build script on master. I will be working today to squash it, but I still wanted to submit these patches in order to start the review process. I have bootstrapped on aarch64-linux