ira.c validate_equiv_mem
authorAlan Modra <amodra@gmail.com>
Sat, 30 Apr 2016 00:00:22 +0000 (09:30 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 30 Apr 2016 00:00:22 +0000 (09:30 +0930)
commit63ce14e03b93e351286c9c7b0d20abb5d85b0f20
treea725f9a222e218eee12c6290bad3b78c73e16c97
parentb00544fa6d5f94f73502017d4a1b6b28e9abdc19
ira.c validate_equiv_mem

This function is used to validate REG_EQUIV notes generated by ira,
and to validate potential insn combines performed by ira.  The two
conditions are not exactly the same, with reload being more
restrictive.  Separate them so more combines/moves can occur.

For example, this sequence from cfgexpand.c:expand_gimple_cond
callq  _Z18update_bb_for_insnP15basic_block_def
mov    0x10(%rbx),%rdi
mov    0x0(%rip),%rbp        # x_rtl+0x34
callq  _Z9safe_as_aIP8rtx_insn7rtx_defET_PT0_
mov    %r13,%rdx
mov    %rbp,%rsi
mov    %rax,%rdi
callq  _Z18create_basic_blockP7rtx_defS0_P15basic_block_def

becomes
callq  _Z18update_bb_for_insnP15basic_block_def
mov    0x10(%rbx),%rdi
callq  _Z9safe_as_aIP8rtx_insn7rtx_defET_PT0_
mov    0x0(%rip),%rsi        # x_rtl+0x34
mov    %r13,%rdx
mov    %rax,%rdi
callq  _Z18create_basic_blockP7rtx_defS0_P15basic_block_def

* ira.c (enum valid_equiv): New.
(validate_equiv_mem): Return enum.
(update_equiv_mem): Create replacement in more cases.
(add_store_equivs): Update validate_equiv_mem call.

From-SVN: r235661
gcc/ChangeLog
gcc/ira.c