This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: patch to fix IRA degradation on SPEC2006 calculix

On Tue, Nov 18, 2008 at 7:45 PM, Vladimir Makarov <> wrote:
> H.J. reported huge degradation of IRA on calculix on x86_64
> Calculix has one hot function (about 80% of all program time) e_c3d
> with small most frequently executed loop.  One accidental spill in the
> loop results in 30% degradation.  The degradation occurred after
> submitting patch introducing bad spills processing.  I missed another
> checks of bad spills in allocno comparison when all previous high
> priority criteria are the same (see
> ira-color.c::push_allocnos_to_stack).
> I also found that the hot function in calculix has more 50 loops,
> therefore IRA decides to use one region allocation.  Instead of such
> approach, I change the code to make no more ira-max-loops-num regions
> (most frequenly used ones) instead of one region.  I also changed
> ira-max-loops-num value to 100 (there are still functions in calculix
> which contains more 100 loops) because it looks like fortran functions
> have many implicit loops (from vector operations).  It permits to
> improve calculix score a bit more.
> The rest of the patch is a code printing more info which I used for
> debugging.
> The patch was successfully bootstrapped on x86_64.
> Is it ok to commit?

It doesn't bootstrap Linux/x86-64:

[hjl@gnu-27 src]$ /export/build/gnu/gcc/build-x86_64-linux/./gcc/xgcc
-shared-libgcc -B/export/build/gnu/gcc/build-x86_64-linux/./gcc
-nostdinc++ -L/export/build/gnu/gcc/build-x86_64-linux/x86_64-unknown-linux-gnu/libstdc++-v3/src
-B/usr/gcc-4.4/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/gcc-4.4/x86_64-unknown-linux-gnu/include -isystem
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-g -O2 -D_GNU_SOURCE -c
 -fPIC -DPIC -o .libs/bitmap_allocator.o
In member function âsize_t* __gnu_cxx::free_list::_M_get(size_t)â:
internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.
[hjl@gnu-27 src]$

I used "--enable-clocale=gnu --with-system-zlib
--enable-checking=assert --with-demangler-in-ld --enable-shared
--enable-threads=posix --enable-haifa --prefix=/usr/gcc-4.4
--with-local-prefix=/usr/local" to configure gcc.

> 2008-11-18  Vladimir Makarov  <>
>   * doc/invoke.texi (ira-max-loops-num): Change semantics.
>   * ira-int.h (struct ira_loop_tree_node): New member to_remove_p.
>   * ira-color.c (allocno_spill_priority): New function.
>   (remove_allocno_from_bucket_and_push, push_allocno_to_spill):
>   Print more info about the spilled allocno.
>   (push_allocnos_to_stack): Use allocno_spill_priority.  Add more
>   checks on bad spill.
>   * ira-build.c (loop_node_to_be_removed_p): Remove.
>   (loop_compare_func, mark_loops_for_removal): New functions.
>   (remove_uneccesary_loop_nodes_from_loop_t): Use member
>   to_remove_p.
>   (remove_unnecessary_allocnos): Call mark_loops_for_removal.
>   * ira.c (ira): Don't change flag_ira_algorithm.
>   * params.def (ira-max-loops-num): Change the value.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]