* IRA has been merged into trunk
@ 2008-08-26 15:45 Vladimir Makarov
2008-08-26 17:19 ` H.J. Lu
` (4 more replies)
0 siblings, 5 replies; 17+ messages in thread
From: Vladimir Makarov @ 2008-08-26 15:45 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 8970 bytes --]
Recently I got an approval of the last part of IRA -- reload
changes. Therefore I've just merged IRA into mainline.
The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
and Itanium.
2008-08-26 Vladimir Makarov <vmakarov@redhat.com>
* ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.
* doc/passes.texi: Describe IRA.
* doc/tm.texi (IRA_COVER_CLASSES,
IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.
* doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
(-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
-fira-propagate-cost, -fno-ira-share-save-slots,
-fno-ira-share-spill-slots, -fira-verbose): Describe new options.
* flags.h (ira_algorithm): New enumeration.
(flag_ira_algorithm, flag_ira_verbose): New external variable
declarations.
* postreload.c (gate_handle_postreload): Don't do post reload
optimizations unless the reload is completed.
* reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
IRA.
* tree-pass.h (pass_ira): New external variable declaration.
* reload.h: Add 2008 to the Copyright.
* cfgloopanal.c: Include params.h.
(estimate_reg_pressure_cost): Decrease cost for IRA optimization
mode.
* params.h (IRA_MAX_LOOPS_NUM): New macro.
* toplev.c (ira.h): New include.
(flag_ira_algorithm, flag_ira_verbose): New external variables.
(backend_init_target): Call ira_init.
(backend_init): Call ira_init_once.
(finalize): Call finish_ira_once.
* toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
flag_ira_share_save_slots, flag_ira_share_spill_slots): New
external variables.
* regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
may_move_out_cost): New external variable declarations.
(move_table): New typedef.
* caller-save.c: Include headers output.h and ira.h.
(no_caller_save_reg_set): New global variable.
(save_slots_num, save_slots): New variables.
(reg_save_code, reg_restore_code, add_stored_regs): Add
prototypes.
(init_caller_save): Set up no_caller_save_reg_set.
(init_save_areas): Reset save_slots_num.
(saved_hard_reg): New structure.
(hard_reg_map, saved_regs_num, all_saved_regs): New variables.
(initiate_saved_hard_regs, new_saved_hard_reg,
finish_saved_hard_regs, saved_hard_reg_compare_func): New
functions.
(setup_save_areas): Add code for sharing stack slots.
(all_blocks): New variable.
(save_call_clobbered_regs): Process pseudo-register too.
(mark_set_regs): Process pseudo-register too.
(insert_one_insn): Put the insn after bb note in a empty basic
block. Add insn check.
* global.c (eliminable_regset): Make it external.
(mark_elimination): Use DF_LR_IN for IRA.
(pseudo_for_reload_consideration_p): New.
(build_insn_chain): Make it external. Don't ignore spilled
pseudos for IRA. Use pseudo_for_reload_consideration_p.
(gate_handle_global_alloc): New function.
(pass_global_alloc): Add the gate function.
* opts.c (decode_options): Set up flag_ira. Print the warning for
-fira.
(common_handle_option): Process -fira-algorithm and -fira-verbose.
* timevar.def (TV_IRA, TV_RELOAD): New passes.
* regmove.c (regmove_optimize): Don't do replacement of output for
IRA.
* hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
New external variable declarations.
* local-alloc.c (update_equiv_regs): Make it external. Return
true if jump label rebuilding should be done. Rescan new_insn for
notes.
(gate_handle_local_alloc): New function.
(pass_local_alloc): Add the gate function.
* alias.c (value_addr_p, stack_addr_p): New functions.
(nonoverlapping_memrefs_p): Use them for IRA.
* common.opt (fira, fira-algorithm, fira-coalesce,
fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
fira-verbose): New options.
* regclass.c (reg_class_subclasses, contains_reg_of_mode,
move_cost, may_move_in_cost, may_move_out_cost): Make the
variables external.
(move_table): Remove typedef.
(init_move_cost): Make it external.
(allocate_reg_info, resize_reg_info, setup_reg_classes): New
functions.
* rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
setup_reg_classes): New function prototypes.
(eliminable_regset): New external variable declaration.
(build_insn_chain, update_equiv_regs): New function prototypes.
* Makefile.in (IRA_INT_H): New definition.
(OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
(reload1.o, toplev.o): Add dependence on ira.h.
(cfgloopanal.o): Add PARAMS_H.
(caller-save.o): Add dependence on output.h and ira.h.
(ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
ira-emit.o, ira-lives.o): New entries.
* passes.c (pass_ira): New pass.
* params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.
* reload1.c (ira.h): Include the header.
(changed_allocation_pseudos): New bitmap.
(init_reload): Initiate the bitmap.
(compute_use_by_pseudos): Permits spilled registers in FROM.
(temp_pseudo_reg_arr): New variable.
(reload): Allocate and free temp_pseudo_reg_arr. Sort pseudos for
IRA. Call alter_reg with the additional parameter. Don't clear
spilled_pseudos for IRA. Restore original insn chain for IRA.
Clear changed_allocation_pseudos at the end of reload.
(calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
(hard_regno_to_pseudo_regno): New variable.
(count_pseudo): Check spilled pseudos. Set up
hard_regno_to_pseudo_regno.
(count_spilled_pseudo): Check spilled pseudos. Update
hard_regno_to_pseudo_regno.
(find_reg): Use better_spill_reload_regno_p. Check
hard_regno_to_pseudo_regno.
(alter_reg): Set up spilled_pseudos. Add a new parameter. Add
code for IRA.
(eliminate_regs_1): Use additional parameter for alter_reg.
(finish_spills): Set up pseudo_previous_regs only for spilled
pseudos. Call reassign_pseudos once for all spilled pseudos, pass
more arguments. Don't clear live_throughout and dead_or_set for
spilled pseudos. Use additional parameter for alter_reg. Call
mark_allocation_change. Set up changed_allocation_pseudos.
Remove sanity check.
(emit_input_reload_insns, delete_output_reload): Use additional
parameter for alter_reg. Call mark_allocation_change.
(substitute, gen_reload_chain_without_interm_reg_p): New
functions.
(reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
* testsuite/gcc.dg/20080410-1.c: New file.
* config/s390/s390.h (IRA_COVER_CLASSES,
IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.
* config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.
* config/i386/i386.h (IRA_COVER_CLASSES): Ditto.
* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.
* config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.
* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
* config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
2008-08-24 Jeff Law <law@redhat.com>
* ira.c (setup_reg_class_intersect_union): Prefer smallest class
when ignoring unavailable registers.
2008-08-24 Jeff Law <law@redhat.com>
* ira-color.c (coalesced_pseudo_reg_slot_compare): Check
FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
* ira.c (setup_eliminable_regset): Check stack_realign_needed.
* config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.
2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
* ira-build.c (allocno_range_compare_func): Stabilize sort.
2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
* config/avr/avr.h (IRA_COVER_CLASSES): New macro.
* reload1.c (find_reg): Process registers in register allocation order.
2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
* toplev.c (backend_init_target): Move ira_init call from
here...
(lang_dependent_init_target): ...to here.
2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
* ira.c (setup_class_subset_and_memory_move_costs): Don't
calculate memory move costs for NO_REGS.
2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
* ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
STACK_REGS is defined.
2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
* config/spu/spu.h (IRA_COVER_CLASSES): New macro.
2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.
2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.h (IRA_COVER_CLASSES): Define.
* config/sh/sh.md (movsicc_true+3): Check if emit returns a
barrier.
[-- Attachment #2: IRA.patch.gz --]
[-- Type: application/x-gzip, Size: 130787 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
@ 2008-08-26 17:19 ` H.J. Lu
2008-08-26 17:41 ` H.J. Lu
` (5 more replies)
2008-08-26 19:20 ` Jeff Law
` (3 subsequent siblings)
4 siblings, 6 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-26 17:19 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
@ 2008-08-26 17:41 ` H.J. Lu
2008-08-26 17:46 ` H.J. Lu
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-26 17:41 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
2008-08-26 17:41 ` H.J. Lu
@ 2008-08-26 17:46 ` H.J. Lu
2008-08-26 19:34 ` H.J. Lu
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-26 17:46 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
2008-08-26 17:19 ` H.J. Lu
@ 2008-08-26 19:20 ` Jeff Law
2008-08-28 17:22 ` Joseph S. Myers
` (2 subsequent siblings)
4 siblings, 0 replies; 17+ messages in thread
From: Jeff Law @ 2008-08-26 19:20 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
Vladimir Makarov wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
It should be noted that both RTH and myself reviewed the pending patches
via private correspondence. We raised minor issues which Vlad
addressed on the branch before integrating into the mainline. In
hindsight, we should have CC'd the public lists on those messages.
jeff
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
2008-08-26 17:41 ` H.J. Lu
2008-08-26 17:46 ` H.J. Lu
@ 2008-08-26 19:34 ` H.J. Lu
2008-08-27 8:20 ` H.J. Lu
` (2 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-26 19:34 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
` (2 preceding siblings ...)
2008-08-26 19:34 ` H.J. Lu
@ 2008-08-27 8:20 ` H.J. Lu
2008-08-27 17:39 ` H.J. Lu
2008-08-27 20:37 ` H.J. Lu
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-27 8:20 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
` (3 preceding siblings ...)
2008-08-27 8:20 ` H.J. Lu
@ 2008-08-27 17:39 ` H.J. Lu
2008-08-27 20:37 ` H.J. Lu
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-27 17:39 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 17:19 ` H.J. Lu
` (4 preceding siblings ...)
2008-08-27 17:39 ` H.J. Lu
@ 2008-08-27 20:37 ` H.J. Lu
5 siblings, 0 replies; 17+ messages in thread
From: H.J. Lu @ 2008-08-27 20:37 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
> The IRA patch was successfully boostrapped on x86, x86_64, ppc64,
> and Itanium.
>
IRA merge caused a few regressions on Linux/x86-64:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37243
Before and after testsuite results are at
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02418.html
http://gcc.gnu.org/ml/gcc-testresults/2008-08/msg02424.html
H.J.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
2008-08-26 17:19 ` H.J. Lu
2008-08-26 19:20 ` Jeff Law
@ 2008-08-28 17:22 ` Joseph S. Myers
2008-08-28 23:28 ` Vladimir Makarov
2008-08-28 19:58 ` Andrew Pinski
2008-08-28 20:14 ` Andrew Pinski
4 siblings, 1 reply; 17+ messages in thread
From: Joseph S. Myers @ 2008-08-28 17:22 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, 26 Aug 2008, Vladimir Makarov wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
Thus, we start the 30-day period before removal of the old allocator, as
per <http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01812.html>, with the
removal due on or shortly after 25 September. Will you volunteer to do
the removal of the old allocator, including any functions in other files
that are no longer needed once it is removed?
We need to warn maintainers of the unconverted targets about this. Could
you
(a) provide any pointers to guidance for target maintainers converting
their targets, to go in this warning;
(b) confirm that the test for whether a target is converted is whether it
defines IRA_COVER_CLASSES?
With that information, I can send an announcement to the gcc list and all
the listed maintainers of unconverted targets.
Please also write some release notes for gcc-4.4/changes.html about this
new feature (figures for improvements on benchmarks might be useful), and
probably an announcement for the main htdocs/index.html page as well.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
` (2 preceding siblings ...)
2008-08-28 17:22 ` Joseph S. Myers
@ 2008-08-28 19:58 ` Andrew Pinski
2008-08-28 23:55 ` Andrew Pinski
2008-08-28 20:14 ` Andrew Pinski
4 siblings, 1 reply; 17+ messages in thread
From: Andrew Pinski @ 2008-08-28 19:58 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
This causes the PowerPC64 testcase gcc.target/powerpc/ppc64-double-1.c
to fail. This was added to make sure that the register allocator
would get the correct answer of using the floating point registers for
fix_truncdfdi2 and floatdidf2.
Which have the following constraints:
"!f#r"
Before the register allocator we have:
(insn:HI 6 7 12 2
gcc/gcc/testsuite/gcc.target/powerpc/ppc64-double-1.c:9 (set (reg:DI
122)
(fix:DI (reg:DF 33 1 [ d ]))) 267 {fix_truncdfdi2}
(expr_list:REG_DEAD (reg:DF 33 1 [ d ])
(nil)))
(insn:HI 12 6 18 2
gcc/gcc/testsuite/gcc.target/powerpc/ppc64-double-1.c:11 (set
(reg/i:DF 33 1)
(float:DF (reg:DI 122))) 263 {floatdidf2} (expr_list:REG_DEAD
(reg:DI 122)
(nil)))
IRA says:
Pass 0 for finding allocno costs
a0 (r122,l0) best GENERAL_REGS, cover GENERAL_REGS
Which is wrong as FLOAT_REGS is still better as both instruction take
FLOAT_REGS but is discouraged.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
` (3 preceding siblings ...)
2008-08-28 19:58 ` Andrew Pinski
@ 2008-08-28 20:14 ` Andrew Pinski
4 siblings, 0 replies; 17+ messages in thread
From: Andrew Pinski @ 2008-08-28 20:14 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
We produce now produce worse code for gcc.dg/20020103-1.c on powerpc64
with TOCs (and the stack space goes up, 256 vs 272).
Before IRA we emitted:
ld 3,.LC0@toc(2)
but after we had spill the address to the stack which is wrose:
--- before.s 2008-08-28 02:14:27.000000000 +0900
+++ after.s 2008-08-28 02:14:13.000000000 +0900
@@ -40,8 +40,9 @@ bar:
std 27,-40(1)
std 28,-32(1)
std 29,-24(1)
- stdu 1,-256(1)
+ stdu 1,-272(1)
lwzu 5,4(31)
+ std 9,112(1)
lwa 4,0(30)
lwa 3,0(9)
extsw 5,5
@@ -52,12 +53,13 @@ bar:
#asm
# 0 "" 2
#NO_APP
+ ld 9,112(1)
mr 4,30
- ld 3,.LC0@toc(2)
mr 5,31
+ mr 3,9
bl f2
nop
- addi 1,1,256
+ addi 1,1,272
ld 0,16(1)
ld 14,-144(1)
mtlr 0
Also if we are going to spill it to memory, then why use another
register and not just r3?
Note the comment on the testcase is incorrect:
/* Verify that constant equivalences get reloaded properly, either by being
spilled to the stack, or regenerated, but not dropped to memory. */
We do regnerate it so the check should not be done on lP64 Powerpc (or
any PowerOpen [TOC] based ABIs); I should mention that powerpc64 elf
has @got but xcoff does not have a @got which is why GCC uses the old
way of producing the TOC section.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-28 17:22 ` Joseph S. Myers
@ 2008-08-28 23:28 ` Vladimir Makarov
2008-08-31 10:37 ` Jeff Law
0 siblings, 1 reply; 17+ messages in thread
From: Vladimir Makarov @ 2008-08-28 23:28 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches
Joseph S. Myers wrote:
> On Tue, 26 Aug 2008, Vladimir Makarov wrote:
>
>> Recently I got an approval of the last part of IRA -- reload
>> changes. Therefore I've just merged IRA into mainline.
>
> Thus, we start the 30-day period before removal of the old allocator, as
> per <http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01812.html>, with the
> removal due on or shortly after 25 September. Will you volunteer to do
> the removal of the old allocator, including any functions in other files
> that are no longer needed once it is removed?
>
Yes, I could do that and probably it is more easier to do it for me than
for anybody else.
> We need to warn maintainers of the unconverted targets about this. Could
> you
>
> (a) provide any pointers to guidance for target maintainers converting
> their targets, to go in this warning;
>
The conversion is easy they should only define IRA_COVER_CLASSES in the
target machine-dependent file (.h file).
I'd recommend to
o read description of macro IRA_COVER_CLASSES in GCC documentation first
o look at IRA_COVER_CLASSES definitions in the targets with already
ported IRA:
x86/x86_64, ppc, itanium, arm, sparc, s390, sh, bfin, spu, avr,
alpha, mn10300.
In worst case (I think the worst case will be MIPS targets), there may
be several variants of the macro definition. In such cases it is hard
to say what variant will be best with the performance point of view
without some analysis. Unfortunately, choice of the variants can not be
algorithmized, otherwise I'd have rid off the macro. If target
maintainers have any questions about IRA_COVER_CLASSES definition, I am
ready to help them. I am ready to look at all their target macro
definitions.
> (b) confirm that the test for whether a target is converted is whether it
> defines IRA_COVER_CLASSES?
>
Yes, that is right defining IRA_COVER_CLASSES in the machine-dependent
file of the target is enough to switch on IRA for the target and even
make IRA as a default RA. The old register allocator can be still used
by option -fno-ira.
> With that information, I can send an announcement to the gcc list and all
> the listed maintainers of unconverted targets.
>
> Please also write some release notes for gcc-4.4/changes.html about this
> new feature (figures for improvements on benchmarks might be useful), and
> probably an announcement for the main htdocs/index.html page as well.
>
Ok, I'll do it tomorrow.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-28 19:58 ` Andrew Pinski
@ 2008-08-28 23:55 ` Andrew Pinski
0 siblings, 0 replies; 17+ messages in thread
From: Andrew Pinski @ 2008-08-28 23:55 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: gcc-patches
On Wed, Aug 27, 2008 at 1:04 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
>> Recently I got an approval of the last part of IRA -- reload
>> changes. Therefore I've just merged IRA into mainline.
>
> This causes the PowerPC64 testcase gcc.target/powerpc/ppc64-double-1.c
> to fail. This was added to make sure that the register allocator
> would get the correct answer of using the floating point registers for
> fix_truncdfdi2 and floatdidf2.
> Which have the following constraints:
> "!f#r"
>
> Before the register allocator we have:
> (insn:HI 6 7 12 2
> gcc/gcc/testsuite/gcc.target/powerpc/ppc64-double-1.c:9 (set (reg:DI
> 122)
> (fix:DI (reg:DF 33 1 [ d ]))) 267 {fix_truncdfdi2}
> (expr_list:REG_DEAD (reg:DF 33 1 [ d ])
> (nil)))
>
> (insn:HI 12 6 18 2
> gcc/gcc/testsuite/gcc.target/powerpc/ppc64-double-1.c:11 (set
> (reg/i:DF 33 1)
> (float:DF (reg:DI 122))) 263 {floatdidf2} (expr_list:REG_DEAD
> (reg:DI 122)
> (nil)))
>
> IRA says:
> Pass 0 for finding allocno costs
>
> a0 (r122,l0) best GENERAL_REGS, cover GENERAL_REGS
>
> Which is wrong as FLOAT_REGS is still better as both instruction take
> FLOAT_REGS but is discouraged.
I forgot to mention, that now this causes a reload that did not happen before.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-28 23:28 ` Vladimir Makarov
@ 2008-08-31 10:37 ` Jeff Law
2008-08-31 10:42 ` David Daney
2008-08-31 15:49 ` DJ Delorie
0 siblings, 2 replies; 17+ messages in thread
From: Jeff Law @ 2008-08-31 10:37 UTC (permalink / raw)
To: Vladimir Makarov; +Cc: Joseph S. Myers, gcc-patches
Vladimir Makarov wrote:
> In worst case (I think the worst case will be MIPS targets), there may
> be several variants of the macro definition. In such cases it is hard
> to say what variant will be best with the performance point of view
> without some analysis. Unfortunately, choice of the variants can not
> be algorithmized, otherwise I'd have rid off the macro. If target
> maintainers have any questions about IRA_COVER_CLASSES definition, I
> am ready to help them. I am ready to look at all their target macro
> definitions.
I suspect MIPS will be a pain, mostly because of the testing requirements.
I expect the PA to be somewhat painful because of oddities in how we
support xmpyu and the dbra class of insns.
I expect the m68k to potentially stumble over some of the same problems
as the mn103 -- specifically around partial word values in ADDRESS_REGS
-- it's likely we'll be twiddling constraints and/or defining more
secondary reload cases. Testing will also be painful unless someone's
got a m68k simulator handy.
I've nailed down the latent mn103 bug (missing secondary reload for
am33-2 FP loads/stores), but I'm still stumbling over some problems with
-O0 C++ code which manifest themselves as testcases stomping over
malloc's datastructures. Luckily I've been able to trigger them with
malloc debug enabled, so it ought to be a little easier to nail them down.
I've got H8 bits in testing right now.
NickC beat me to a bunch of the embedded targets (v850, m32r, fr30,
iq2000, mcore).
Jeff
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-31 10:37 ` Jeff Law
@ 2008-08-31 10:42 ` David Daney
2008-08-31 15:49 ` DJ Delorie
1 sibling, 0 replies; 17+ messages in thread
From: David Daney @ 2008-08-31 10:42 UTC (permalink / raw)
To: Jeff Law; +Cc: Vladimir Makarov, Joseph S. Myers, gcc-patches
Jeff Law wrote:
> Vladimir Makarov wrote:
>> In worst case (I think the worst case will be MIPS targets), there may
>> be several variants of the macro definition. In such cases it is hard
>> to say what variant will be best with the performance point of view
>> without some analysis. Unfortunately, choice of the variants can not
>> be algorithmized, otherwise I'd have rid off the macro. If target
>> maintainers have any questions about IRA_COVER_CLASSES definition, I
>> am ready to help them. I am ready to look at all their target macro
>> definitions.
> I suspect MIPS will be a pain, mostly because of the testing requirements.
>
I do a full bootstrap and run the testsuite for all languages (except
ada) on a mipsel-linux system (32 bit) in about 17 hours. Please let me
know if you would like me to test any MIPS patches.
David Daney
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: IRA has been merged into trunk
2008-08-31 10:37 ` Jeff Law
2008-08-31 10:42 ` David Daney
@ 2008-08-31 15:49 ` DJ Delorie
1 sibling, 0 replies; 17+ messages in thread
From: DJ Delorie @ 2008-08-31 15:49 UTC (permalink / raw)
To: Jeff Law; +Cc: gcc-patches
Jeff Law <law@redhat.com> writes:
> NickC beat me to a bunch of the embedded targets (v850, m32r, fr30,
> iq2000, mcore).
I've started on m32c but it's going to be a pain due to the unusual
register set it's got.
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-08-29 17:06 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-26 15:45 IRA has been merged into trunk Vladimir Makarov
2008-08-26 17:19 ` H.J. Lu
2008-08-26 17:41 ` H.J. Lu
2008-08-26 17:46 ` H.J. Lu
2008-08-26 19:34 ` H.J. Lu
2008-08-27 8:20 ` H.J. Lu
2008-08-27 17:39 ` H.J. Lu
2008-08-27 20:37 ` H.J. Lu
2008-08-26 19:20 ` Jeff Law
2008-08-28 17:22 ` Joseph S. Myers
2008-08-28 23:28 ` Vladimir Makarov
2008-08-31 10:37 ` Jeff Law
2008-08-31 10:42 ` David Daney
2008-08-31 15:49 ` DJ Delorie
2008-08-28 19:58 ` Andrew Pinski
2008-08-28 23:55 ` Andrew Pinski
2008-08-28 20:14 ` Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).