Use more efficient alignment in ggc
authorAndi Kleen <ak@linux.intel.com>
Sat, 29 Oct 2011 01:02:35 +0000 (01:02 +0000)
committerAndi Kleen <ak@gcc.gnu.org>
Sat, 29 Oct 2011 01:02:35 +0000 (01:02 +0000)
commit3bc50163311275e8da17365a68e10a765a134867
tree8f9e002586202119430d4bd8c63fee062dce5c6a
parent25f0ea8135b221a7d560e9062d30d14be33c5582
Use more efficient alignment in ggc

Jakub had some concerns about the performance of page alignments in
ggc-page, which use a hardware division instructions currently.
This patch changes them all to use a new PAGE_ALIGN macro, which
exploits that pages are a power of two.

gcc/:
2011-10-21  Andi Kleen  <ak@linux.intel.com>

* ggc-page (PAGE_ALIGN): Add.
(alloc_page, ggc_pch_total_size, ggc_pch_this_base, ggc_pch_read):
Replace ROUND_UP with PAGE_ALIGN.

From-SVN: r180650
gcc/ChangeLog
gcc/ggc-page.c