Compiling Mozilla, IPA reference OOMs for me after allocating about 9GB of bitmaps. It is because the counters inserted to every function by profile-generate are especially bad for the datastructure used by IPA-reference.
As a temporary workaround, I will probably disable IPA reference with profiling is active.
Path posted http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00508.html
Date: Wed Jan 12 10:39:39 2011
New Revision: 168700
* opts.c (common_handle_option): Disable ipa-reference with profile feedback.
Workaround comitted, unasigning and removing from list of Mozilla dependencies.