This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [google] improves option mismatch handling for LIPO (issue4479045)
- From: Diego Novillo <dnovillo at google dot com>
- To: David Li <davidxl at google dot com>
- Cc: reply at codereview dot appspotmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 5 May 2011 15:37:48 -0400
- Subject: Re: [google] improves option mismatch handling for LIPO (issue4479045)
- References: <20110505053624.8A74C205D4@syzygy.mtv.corp.google.com>
On Thu, May 5, 2011 at 01:36, David Li <davidxl@google.com> wrote:
> This patch improves cross module option mismatch handling in LIPO mode -- will be commited to google/main.
>
> 1) Remove duplicates in the option list before comparison;
> 2) Force module incompatiblity when two modules disagree in -fexceptions setting. In LIPO mode, when option mismatch is discovered between the primary and aux module, a warning message is emitted, but the modules will be considered incompatible when -fripa-disallow-opt-mismatch is specified. With this change, exception option mismatch will force the primary module to reject the aux module.
>
> Tested: SPEC with LIPO.
>
>
> 2011-05-04 ÂDavid Li Â<davidxl@google.com>
>
> Â Â Â Â* coverage.c (incompatible_cl_args): Better handling
> Â Â Â Âof option mismatch.
>
> Index: coverage.c
> ===================================================================
> --- coverage.c Â(revision 173353)
> +++ coverage.c Â(working copy)
> @@ -213,6 +213,27 @@ is_last_module (unsigned mod_id)
> Â return (mod_id == module_infos[num_in_fnames - 1]->ident);
> Â}
>
> +/* String hash function Â*/
> +
> +static hashval_t
> +str_hash (const void *p)
> +{
> + Âconst char *s = (const char *)p;
> + Âreturn htab_hash_string (s);
> +}
You can use htab_hash_string directly. No need to wrap it further.
OK with those changes.
Diego.