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: [google] improves option mismatch handling for LIPO (issue4479045)


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.


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