diff options
author | 2007-07-29 22:32:22 -0700 | |
---|---|---|
committer | 2007-07-29 22:50:42 -0700 | |
commit | b5a8032aaeaf2121a642ead32653d4288fa2983d (patch) | |
tree | 2c12e04b893a5cfc4f24971ed5ddaa6b067ecdf9 /cse.c | |
parent | Makefile: Use -O2 -finline-functions, not just -O (diff) | |
download | sparse-b5a8032aaeaf2121a642ead32653d4288fa2983d.tar.gz sparse-b5a8032aaeaf2121a642ead32653d4288fa2983d.tar.bz2 sparse-b5a8032aaeaf2121a642ead32653d4288fa2983d.zip |
cse: Size insn_hash_table more realistically, speeding up CSE significantly
Profiling showed that Sparse spent much of its time doing CSE, which involved
traversing every bucket of insn_hash_table repeatedly. insn_hash_table had
64K buckets, but never more than a few dozen entries. Shrink insn_hash_table
to 256 entries. This makes Sparse 2-4 times faster for me.
Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'cse.c')
-rw-r--r-- | cse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ #include "linearize.h" #include "flow.h" -#define INSN_HASH_SIZE 65536 +#define INSN_HASH_SIZE 256 static struct instruction_list *insn_hash_table[INSN_HASH_SIZE]; int repeat_phase; |