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] Speed up genattrtab


Jakub Jelinek wrote:

> 2006-12-29  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* genattrtab.c (struct attr_value_list, insn_code_values): Move to
> 	file scope from optimize_attrs.
> 	(simplify_test_exp): If insn_code_values is not NULL, use it to speed
> 	up search.
> 	(optimize_attrs): Clear insn_code_values after freeing it.

> +	  else
> +	    {
> +	      for (av = attr->first_value; av; av = av->next)
> +		for (ie = av->first_insn; ie; ie = ie->next)
> +		  if (ie->def->insn_code == insn_code)
> +		    goto got_av;
> +	    }

Style nit: there should be no braces here, since there is a single
dependent statement.

OK with that change.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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