summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-22 12:02:26 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-22 12:02:26 +0000
commite2f730a9ff8c15c7928e69ddabedac587a5644ec (patch)
treeeee5382fbf8bb42300717bebf986a46d87ae8a9f /gcc/config
parente1a797ade2cd2dffe3e9ff73826422700f010c84 (diff)
downloadgcc-e2f730a9ff8c15c7928e69ddabedac587a5644ec.tar.gz
gcc/
* recog.h (constrain_operands): Add an alternative_mask parameter. (constrain_operands_cached): Likewise. (get_preferred_alternatives): Declare new form. * recog.c (get_preferred_alternatives): New bb-taking instance. (constrain_operands): Take the set of available alternatives as a parameter. (check_asm_operands, insn_invalid_p, extract_constrain_insn) (extract_constrain_insn_cached): Update calls to constrain_operands. * caller-save.c (reg_save_code): Likewise. * ira.c (setup_prohibited_mode_move_regs): Likewise. * postreload-gcse.c (eliminate_partially_redundant_load): Likewise. * ree.c (combine_reaching_defs): Likewise. * reload.c (can_reload_into): Likewise. * reload1.c (reload, reload_as_needed, inc_for_reload): Likewise. (gen_reload_chain_without_interm_reg_p, emit_input_reload_insns) (emit_insn_if_valid_for_reload): Likewise. * reorg.c (fill_slots_from_thread): Likewise. * config/i386/i386.c (ix86_attr_length_address_default): Likewise. * config/pa/pa.c (pa_can_combine_p): Likewise. * config/rl78/rl78.c (insn_ok_now): Likewise. * config/sh/sh.md (define_peephole2): Likewise. * final.c (final_scan_insn): Update call to constrain_operands_cached. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216555 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/config/pa/pa.c4
-rw-r--r--gcc/config/rl78/rl78.c4
-rw-r--r--gcc/config/sh/sh.md10
4 files changed, 12 insertions, 8 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 65b31734d39..ec3e056a3d2 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -25467,7 +25467,7 @@ ix86_attr_length_address_default (rtx_insn *insn)
for (i = recog_data.n_operands - 1; i >= 0; --i)
if (MEM_P (recog_data.operand[i]))
{
- constrain_operands_cached (reload_completed);
+ constrain_operands_cached (insn, reload_completed);
if (which_alternative != -1)
{
const char *constraints = recog_data.constraints[i];
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 4584ec266a4..05131d493f9 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -9064,8 +9064,10 @@ pa_can_combine_p (rtx_insn *new_rtx, rtx_insn *anchor, rtx_insn *floater,
XVECEXP (PATTERN (new_rtx), 0, 1) = PATTERN (floater);
INSN_CODE (new_rtx) = -1;
insn_code_number = recog_memoized (new_rtx);
+ basic_block bb = BLOCK_FOR_INSN (anchor);
if (insn_code_number < 0
- || (extract_insn (new_rtx), ! constrain_operands (1)))
+ || (extract_insn (new_rtx),
+ !constrain_operands (1, get_preferred_alternatives (new_rtx, bb)))
return 0;
if (reversed)
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index e8f72abdfe9..f2419ba6226 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -2170,7 +2170,7 @@ insn_ok_now (rtx_insn *insn)
if (recog (pattern, insn, 0) > -1)
{
extract_insn (insn);
- if (constrain_operands (1))
+ if (constrain_operands (1, get_preferred_alternatives (insn)))
{
#if DEBUG_ALLOC
fprintf (stderr, "\033[32m");
@@ -2199,7 +2199,7 @@ insn_ok_now (rtx_insn *insn)
if (recog (pattern, insn, 0) > -1)
{
extract_insn (insn);
- if (constrain_operands (0))
+ if (constrain_operands (0, get_preferred_alternatives (insn)))
{
cfun->machine->virt_insns_ok = 0;
return false;
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 675017c2c97..b48be1092a3 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -1580,7 +1580,7 @@
(set (match_dup 4) (match_dup 5))]
{
rtx set1, set2;
- rtx_insn *insn2;
+ rtx_insn *insn1, *insn2;
rtx replacements[4];
/* We want to replace occurrences of operands[0] with operands[1] and
@@ -1607,14 +1607,16 @@
/* ??? The last insn might be a jump insn, but the generic peephole2 code
always uses emit_insn. */
/* Check that we don't violate matching constraints or earlyclobbers. */
- extract_insn (emit_insn (set1));
- if (! constrain_operands (1))
+ basic_block bb = BLOCK_FOR_INSN (peep2_next_insn (2));
+ insn1 = emit_insn (set1);
+ extract_insn (insn1);
+ if (! constrain_operands (1, get_preferred_alternatives (insn1, bb)))
goto failure;
insn2 = emit (set2);
if (GET_CODE (insn2) == BARRIER)
goto failure;
extract_insn (insn2);
- if (! constrain_operands (1))
+ if (! constrain_operands (1, get_preferred_alternatives (insn2, bb)))
{
rtx tmp;
failure: