On Fri, Aug 17, 2012 at 1:02 AM, Richard Guenther
<richard.guent...@gmail.com> wrote:
> On Thu, Aug 16, 2012 at 4:40 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>> On Thu, Aug 16, 2012 at 3:09 AM, Richard Guenther
>> <richard.guent...@gmail.com> wrote:
>>> On Thu, Aug 16, 2012 at 1:50 AM, H.J. Lu <hongjiu...@intel.com> wrote:
>>>> Hi,
>>>>
>>>> This patch replaces MEMBER_TYPE_FORCES_BLK with a target hook.  I
>>>> also pass the type to the target hook in addition to field, which will
>>>> be used by i386 backend for
>>>>
>>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20020
>>>>
>>>> This patch doesn't change code generation.  Tested on Linux/x86-64. I
>>>> also tested cross compilers to ia64-hpux, powerpc-linux and xtensa-linux
>>>> up to cc1.  OK to install?
>>>
>>> Isn't the type just always DECL_FIELD_CONTEXT (field)?
>>>
>>> Btw, with C++ you no longer need ATTRIBUTE_UNUSED, just give the
>>> parameter no name.
>>>
>>
>> You are right.  Now I don't need to replace MEMBER_TYPE_FORCES_BLK
>> with a target hook for PR 20020.  Since I already made the change, here is
>> the updated patch.  OK to install?
>>
>> If we don't want to convert MEMBER_TYPE_FORCES_BLK, I can submit a
>> patch to use MEMBER_TYPE_FORCES_BLK in i386 backend.
>
> Please put the hook documentation in target.def.  The macro -> hook conversion
> is ok with that change.  Any functional change has to go via target 
> maintainers.
>
> Thanks,
> Richard.
>

Here is the updated patch.   Steve, David, Sterling,  can you take a look
at ia64, rs6000 and xtensa changes?

Thanks.

-- 
H.J.
---
2012-08-17  H.J. Lu  <hongjiu...@intel.com>

        * stor-layout.c (compute_record_mode): Replace
        MEMBER_TYPE_FORCES_BLK with targetm.member_type_forces_blk.
        (layout_type): Likewise.

        * system.h: Poison MEMBER_TYPE_FORCES_BLK.

        * target.def (member_type_forces_blk): New target hook.

        * targhooks.c (default_member_type_forces_blk): New.
        * targhooks.h (default_member_type_forces_blk): Likewise.

        * doc/tm.texi.in (MEMBER_TYPE_FORCES_BLK): Removed.
        (TARGET_MEMBER_TYPE_FORCES_BLK): New hook.
        * doc/tm.texi: Regenerated.

        * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Removed.

        * config/ia64/ia64.c (ia64_member_type_forces_blk): New
        function.
        (TARGET_MEMBER_TYPE_FORCES_BLK): New macro.

        * config/rs6000/rs6000.c (TARGET_MEMBER_TYPE_FORCES_BLK): New
        macro.
        (rs6000_member_type_forces_blk): New function.

        * config/rs6000/rs6000.h (MEMBER_TYPE_FORCES_BLK): Removed.

        * config/xtensa/xtensa.c (xtensa_member_type_forces_blk): New
        function.
        (TARGET_MEMBER_TYPE_FORCES_BLK): New macro.

        * config/xtensa/xtensa.h (MEMBER_TYPE_FORCES_BLK): Removed.

Attachment: gcc-blkmode-3.patch
Description: Binary data

Reply via email to