This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [EXT] Re: Modifying types during optimization
- From: Gary Oblock <goblock at marvell dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 3 Oct 2019 21:16:18 +0000
- Subject: Re: [EXT] Re: Modifying types during optimization
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fnLlOFzsi5htzR4VgKicR+1XeOVsLF5pvU5LgVTBsgg=; b=joqXqgdtYZgIxwQaSIxunJerig9Y3OnvMEcCpIP3BnkuC1GdO9zYTfz/SjMJnBPlxv+toccJIS8IdKsuZiHIYAD7OqBNdU+EC+scIIWPvyVUOenGqhRbStrsUALtB1axlwJxHS43jIPBtfmTchJNkVNnxYxGtfpxcRbyFU9hW6tyDBqFpyqcymTt6S0qHjIsiLjKYiAajFkYuHHeNgNh7TR7A8QPR/5HyPtYFSRijrtnsGciyMu12WHpyCxU5hiY+XfWYsYz4eXdT9Gr2cV9M/WmjcZ9dPy8yG97FCKgIYvSaqCJDr31Gby0cuR6qF/MD3/Ykz4yb2jSzHfULFsArA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lnPkliPafT4BDiFAnVnYMK6XWR6lIJCs7zRHFIlrCmgCbXmHIBrAuCdJbjkds+yENXfRQlQUhAvJQ7T8ZuCTGqlZGkm2kJ1CmKZAzdp1XOiEf73tAX88PAxCLQoV8gGxXdFA4BXY9+gNMhgF0vt3LRUsn1NTR2zdzOKsOhVprnZq8CFjv22RrYhXIkjJDE0afJ5/lsza6RtZE7+RCCNOAtAYJtObSRCcOtvFFX5id7xHLWzrJ95n9zQJgRjm6qpJbMO+XNZr2UYCsAONBX5IiY710RAQKBBcQmGJ7VJgMtgmDEx8dBmz8u4DeIzpDrUOH/9BWpIC937iLNrOUFuGrg==
- References: <MWHPR18MB1072D1B2CF0ED630DFA551BFB99D0@MWHPR18MB1072.namprd18.prod.outlook.com> <CAFiYyc2jFeu6jHoeFmP-ANMN-Yq51m3X+nMjOBzcJeD0_pgwWw@mail.gmail.com>
On 10/2/19 3:15 AM, Richard Biener wrote:
> External Email
>
> ----------------------------------------------------------------------
> On Wed, Oct 2, 2019 at 1:43 AM Gary Oblock <goblock@marvell.com> wrote:
>> I'm working on structure reorganization optimizations and one of the
>> things that needs to happen is that pointers to arrays of structures
>> need to be modified into either being an integer of a structure depending
>> on which optimization is required.
>>
>> I'm seeing something similar happening in omp-low.c where the code in
>> install_var_field and fixup_child_record_type both seem to rebuild the
>> entire type from scratch if a field is either added or modified. Wouldn't
>> it be possible simply modify the field(s) in question and rerun layout_type?
>>
>> I suspect the answer will be no but reasons as to why that wouldn't work
>> will probably be equally valuable to me.
> I think it's undesirable at least. When last discussing "structure reorg"
> I was always arguing that trying to change the "type" is the wrong angle
> to look at (likewise computing something like "type escape"). It's
> really individual objects you are transforming and that you need to track
> so there may be very well instances of the original type T plus the
> modified type T' in the program after the transform.
>
> Richard.
>
>> Thanks,
>>
>> Gary Oblock
>>
I answered Richard privately yesterday but I was wondering if anybody else
had any ideas about modifying type fields. Note, I agreed with Richard
and assured
him I was already planning to do things that way but I still don't see
any reason
why rebuilding a type (it's clone of the other type) is better than
modifying it.
I take my inspiration for relayout_decl and just want to create what in
essence would
be a relayout_type.
Gary