ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a loop to look for a free slot in a page entry.
* ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a loop to look for a free slot in a page entry. From-SVN: r93738
This commit is contained in:
parent
f53d3f9317
commit
6f0947e401
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-01-16 Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
* ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a
|
||||
loop to look for a free slot in a page entry.
|
||||
|
||||
2005-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR target/16304
|
||||
|
|
|
@ -1139,8 +1139,14 @@ ggc_alloc_stat (size_t size MEM_STAT_DECL)
|
|||
word = bit = 0;
|
||||
while (~entry->in_use_p[word] == 0)
|
||||
++word;
|
||||
|
||||
#if GCC_VERSION >= 3004
|
||||
bit = __builtin_ctzl (~entry->in_use_p[word]);
|
||||
#else
|
||||
while ((entry->in_use_p[word] >> bit) & 1)
|
||||
++bit;
|
||||
#endif
|
||||
|
||||
hint = word * HOST_BITS_PER_LONG + bit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue