On 2022-02-25 09:14, Richard Biener wrote:
The following replaces /* Skip bits that are zero. */ for (; (word & 1) == 0; word >>= 1) bit_num++; idioms in ira-int.h in the attempt to speedup update_conflict_hard_regno_costs which we're bound on in PR104686. The trick is to use ctz_hwi here which should pay off even with dense bitmaps on architectures that have HW support for this. For the PR in question this speeds up compile-time from 31s to 24s for me.
It is a really significant improvement.
Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
Yes. Thank you for working on this PR, Richard.
2022-02-25 Richard Biener <rguent...@suse.de> PR rtl-optimization/104686 * ira-int.h (minmax_set_iter_cond): Use ctz_hwi to elide loop skipping bits that are zero. (ira_object_conflict_iter_cond): Likewise.