This is the mail archive of the gcc-cvs@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]

r232467 - in /trunk/gcc: ChangeLog hash-table.h


Author: rsandifo
Date: Sat Jan 16 11:03:18 2016
New Revision: 232467

URL: https://gcc.gnu.org/viewcvs?rev=232467&root=gcc&view=rev
Log:
Optimise hash_table::empty

Calling redirect_edge_var_map_empty after each pass was slowing things
down because hash_table::empty () cleared all slots even if the hash
table was already empty.

Tested on x86_64-linux-gnu, where it gives a 1% compile time improvement
for fold-const.ii at -O and -O2.

gcc/
	* hash-table.h (hash_table::empty): Turn into an inline wrapper
	that checks whether the table is already empty.  Rename the
	original implementation to...
	(hash_table::empty_slot): ...this new private function.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/hash-table.h


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