This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] lto support for target attribute & fixing LTO bootstrap


On Wed, Sep 1, 2010 at 12:37, Andi Kleen <andi@firstfloor.org> wrote:
>
> This fixes the LTO bootstrap after the __target__ changes in libcpp
> and makes LTO work with target attributes in general.
>
> Otherwise the LTO streamer will error out.
>
> I just stream the complete cl_target_option structure, because
> writing out individual members would require messing with the awk
> option scripts.
>
> The method using the check word was suggested by Richard Guenther
>
> Passed full LTO bootstrap and test on x86_64-linux
>
> Ok to commit?
> -Andi
>
> 2010-09-01 ÂAndi Kleen Â<ak@linux.intel.com>
>
> Â Â Â ÂPR45475

PR lto/45475  (I'm not sure if the svn commit pattern matcher will
catch it otherwise).


> +/* Input a TS_TARGET_OPTION tree */
> +
> +static void
> +lto_input_ts_target_option (struct lto_input_block *ib, tree expr)

End comment with '.  */'.  Add documentation for IB and EXPR.


> +/* Write a TS_TARGET_OPTION tree. Always write without reference. */
> +
> +static void
> +lto_output_ts_target_option (struct output_block *ob, tree expr)

Document OB and EXPR.

> + Âbp = bitpack_create (ob->main_stream);
> + Âlen = sizeof (struct cl_target_option);
> + Âfor (i = 0; i < len; i++)
> + Â Âbp_pack_value (&bp, ((unsigned char *)t)[i], 8);
> + Â/* Catch struct size mismatches between reader and writer. */
> + Âbp_pack_value (&bp, 0x12345678, 32);

Make the 0x12345678 sentinel a #define or enum?

OK with those changes.  Thanks for fixing this.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]