Use more efficient alignment in ggc
commit25a28b4458b79989e2661d885d066a272ca7655b
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:02:35 +0000 (29 01:02 +0000)
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 29 Oct 2011 01:02:35 +0000 (29 01:02 +0000)
tree8f9e002586202119430d4bd8c63fee062dce5c6a
parent4a2f812eeb7192c01faef17a3e0fa324f5faff33
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180650 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ggc-page.c