diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-05 20:56:13 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-05 20:56:13 +0000 |
commit | 1f3a048aa0221dc35cc6a5abe55aa692e372a12a (patch) | |
tree | 8a8e7f4e3df96defc69d2feee8fbac6ac8d3a56b /gcc/lra.c | |
parent | 3af610956c973346fde07a92178be25170725e9f (diff) | |
download | gcc-1f3a048aa0221dc35cc6a5abe55aa692e372a12a.tar.gz |
2013-07-05 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/55342
* lra-int.h (lra_subreg_reload_pseudos): New.
* lra.c: Add undoing optional reloads to the block diagram.
(lra_subreg_reload_pseudos): New.
(lra_optional_reload_pseudos): Change comments.
(lra): Init and clear lra_subreg_reload_pseudos. Clear
lra_optional_reload_pseudos after undo transformations.
* lra-assigns.c (pseudo_prefix_title): New.
(lra_setup_reg_renumber): Use it.
(spill_for): Ditto. Check subreg reload pseudos too.
(assign_by_spills): Consider subreg reload pseudos too.
* lra-constraints.c (simplify_operand_subreg): Use
lra_subreg_reload_pseudos instead of lra_optional_reload_pseudos.
(curr_insn_transform): Recognize and do optional reloads.
(undo_optional_reloads): New.
(lra_undo_inheritance): Call undo_optional_reloads.
2013-07-05 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/55342
* gcc.target/i386/pr55342.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200723 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra.c')
-rw-r--r-- | gcc/lra.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/gcc/lra.c b/gcc/lra.c index 6b505c508c3..30b7c0a3dd5 100644 --- a/gcc/lra.c +++ b/gcc/lra.c @@ -43,13 +43,13 @@ along with GCC; see the file COPYING3. If not see Here is block diagram of LRA passes: - --------------------- - --------------- | Undo inheritance | --------------- - | Memory-memory | | for spilled pseudos)| | New (and old) | - | move coalesce |<---| and splits (for |<-- | pseudos | - --------------- | pseudos got the | | assignment | - Start | | same hard regs) | --------------- - | | --------------------- ^ + ------------------------ + --------------- | Undo inheritance for | --------------- + | Memory-memory | | spilled pseudos, | | New (and old) | + | move coalesce |<---| splits for pseudos got |<-- | pseudos | + --------------- | the same hard regs, | | assignment | + Start | | and optional reloads | --------------- + | | ------------------------ ^ V | ---------------- | ----------- V | Update virtual | | | Remove |----> ------------>| register | | @@ -2187,10 +2187,16 @@ bitmap_head lra_inheritance_pseudos; /* Split regnos before the new spill pass. */ bitmap_head lra_split_regs; -/* Reload pseudo regnos before the new assign pass which still can be - spilled after the assinment pass. */ +/* Reload pseudo regnos before the new assignmnet pass which still can + be spilled after the assinment pass as memory is also accepted in + insns for the reload pseudos. */ bitmap_head lra_optional_reload_pseudos; +/* Pseudo regnos used for subreg reloads before the new assignment + pass. Such pseudos still can be spilled after the assinment + pass. */ +bitmap_head lra_subreg_reload_pseudos; + /* First UID of insns generated before a new spill pass. */ int lra_constraint_new_insn_uid_start; @@ -2296,6 +2302,7 @@ lra (FILE *f) bitmap_initialize (&lra_inheritance_pseudos, ®_obstack); bitmap_initialize (&lra_split_regs, ®_obstack); bitmap_initialize (&lra_optional_reload_pseudos, ®_obstack); + bitmap_initialize (&lra_subreg_reload_pseudos, ®_obstack); live_p = false; if (get_frame_size () != 0 && crtl->stack_alignment_needed) /* If we have a stack frame, we must align it now. The stack size @@ -2356,8 +2363,9 @@ lra (FILE *f) if (! live_p) lra_clear_live_ranges (); } + bitmap_clear (&lra_optional_reload_pseudos); } - bitmap_clear (&lra_optional_reload_pseudos); + bitmap_clear (&lra_subreg_reload_pseudos); bitmap_clear (&lra_inheritance_pseudos); bitmap_clear (&lra_split_regs); if (! lra_need_for_spills_p ()) |