Commit eb1485a6 by Uros Bizjak

re PR rtl-optimization/48927 (Issues with "enable" attribute and IRA register preferences)

	PR rtl-optimization/48927
	* ira-conflicts.c (commutative_constraint_p): Use
	recog_data.alternative_enabled_p to disable alternatives where
	"enabled" attribute is false.
	(get_dup_num): Ditto.
	* ira-lives.c (single_reg_class): Ditto.
	(ira_implicitly_set_insn_hard_regs): Ditto.

From-SVN: r173568
parent c46d001a
2011-05-09 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/48927
* ira-conflicts.c (commutative_constraint_p): Use
recog_data.alternative_enabled_p to disable alternatives where
"enabled" attribute is false.
(get_dup_num): Ditto.
* ira-lives.c (single_reg_class): Ditto.
(ira_implicitly_set_insn_hard_regs): Ditto.
2011-05-09 Eric Botcazou <ebotcazou@adacore.com> 2011-05-09 Eric Botcazou <ebotcazou@adacore.com>
* var-tracking.c (find_mem_expr_in_1pdv): Fix thinko. * var-tracking.c (find_mem_expr_in_1pdv): Fix thinko.
...@@ -12,8 +22,7 @@ ...@@ -12,8 +22,7 @@
* config/mips/genopt.sh, config/mips/mips-cpus.def: New files. * config/mips/genopt.sh, config/mips/mips-cpus.def: New files.
* config/mips/mips-tables.opt: New file (generated). * config/mips/mips-tables.opt: New file (generated).
* config.gcc (mips*-*-*): Add mips/mips-tables.opt to * config.gcc (mips*-*-*): Add mips/mips-tables.opt to extra_options.
extra_options.
* config/mips/mips-opts.h (MIPS_ARCH_OPTION_FROM_ABI, * config/mips/mips-opts.h (MIPS_ARCH_OPTION_FROM_ABI,
MIPS_ARCH_OPTION_NATIVE): Define. MIPS_ARCH_OPTION_NATIVE): Define.
* config/mips/mips.c (mips_cpu_info_table): Move contents to * config/mips/mips.c (mips_cpu_info_table): Move contents to
...@@ -24,8 +33,7 @@ ...@@ -24,8 +33,7 @@
(mips_handle_option): Don't assert that global structures are in (mips_handle_option): Don't assert that global structures are in
use. Don't handle OPT_march_, OPT_mtune_ and OPT_mips here. use. Don't handle OPT_march_, OPT_mtune_ and OPT_mips here.
(mips_option_override): Use new variables and functions to set (mips_option_override): Use new variables and functions to set
state of these options. Use strcmp to check for individual CPU state of these options. Use strcmp to check for individual CPU names.
names.
* config/mips/mips.h (MIPS_CPU_STRING_DEFAULT): Remove default * config/mips/mips.h (MIPS_CPU_STRING_DEFAULT): Remove default
definition. definition.
* config/mips/mips.opt (march=): Use ToLower and Enum. * config/mips/mips.opt (march=): Use ToLower and Enum.
...@@ -59,9 +67,11 @@ ...@@ -59,9 +67,11 @@
2011-05-08 Jan Hubicka <jh@suse.cz> 2011-05-08 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_clone_node): Add call_duplication_hook parameter. * cgraph.c (cgraph_clone_node): Add call_duplication_hook parameter.
(cgraph_create_virtual_clone): Call hooks once virtual clone is finished. (cgraph_create_virtual_clone): Call hooks once virtual clone
is finished.
* cgraph.h (cgraph_clone_node): Update prototype. * cgraph.h (cgraph_clone_node): Update prototype.
* ipa-cp.c (ipcp_estimate_growth): Use estimate_ipcp_clone_size_and_time. * ipa-cp.c (ipcp_estimate_growth): Use
estimate_ipcp_clone_size_and_time.
* ipa-inline-transform.c (clone_inlined_nodes): Update. * ipa-inline-transform.c (clone_inlined_nodes): Update.
* lto-cgraph.c (input_node): Update. * lto-cgraph.c (input_node): Update.
* ipa-inline.c (recursive_inlining): Update. * ipa-inline.c (recursive_inlining): Update.
...@@ -127,7 +137,7 @@ ...@@ -127,7 +137,7 @@
* i386.h (ix86_tune_indices): Add * i386.h (ix86_tune_indices): Add
X86_TUNE_SOFTWARE_PREFETCHING_BENEFICIAL. X86_TUNE_SOFTWARE_PREFETCHING_BENEFICIAL.
(TARGET_SOFTWARE_PREFETCHING_BENEFICIAL): New macor. (TARGET_SOFTWARE_PREFETCHING_BENEFICIAL): New macro.
* i386.c (initial_ix86_tune_features): Add * i386.c (initial_ix86_tune_features): Add
X86_SOFTARE_PREFETCHING_BENEFICIAL. X86_SOFTARE_PREFETCHING_BENEFICIAL.
(software_prefetching_beneficial_p): Remove predicate. (software_prefetching_beneficial_p): Remove predicate.
...@@ -227,9 +237,9 @@ ...@@ -227,9 +237,9 @@
2011-05-06 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> 2011-05-06 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
PR target/47930 PR target/47930
* config/arm/arm.opt (marm): Document it. * config/arm/arm.opt (marm): Document it.
(mthumb): Reject negative variant. (mthumb): Reject negative variant.
2011-05-06 Uros Bizjak <ubizjak@gmail.com> 2011-05-06 Uros Bizjak <ubizjak@gmail.com>
......
...@@ -213,19 +213,22 @@ allocnos_conflict_for_copy_p (ira_allocno_t a1, ira_allocno_t a2) ...@@ -213,19 +213,22 @@ allocnos_conflict_for_copy_p (ira_allocno_t a1, ira_allocno_t a2)
static bool static bool
commutative_constraint_p (const char *str) commutative_constraint_p (const char *str)
{ {
int curr_alt, c;
bool ignore_p; bool ignore_p;
int c;
for (ignore_p = false;;) for (ignore_p = false, curr_alt = 0;;)
{ {
c = *str; c = *str;
if (c == '\0') if (c == '\0')
break; break;
str += CONSTRAINT_LEN (c, str); str += CONSTRAINT_LEN (c, str);
if (c == '#') if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
ignore_p = true; ignore_p = true;
else if (c == ',') else if (c == ',')
ignore_p = false; {
curr_alt++;
ignore_p = false;
}
else if (! ignore_p) else if (! ignore_p)
{ {
/* Usually `%' is the first constraint character but the /* Usually `%' is the first constraint character but the
...@@ -270,7 +273,7 @@ get_dup_num (int op_num, bool use_commut_op_p) ...@@ -270,7 +273,7 @@ get_dup_num (int op_num, bool use_commut_op_p)
c = *str; c = *str;
if (c == '\0') if (c == '\0')
break; break;
if (c == '#') if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
ignore_p = true; ignore_p = true;
else if (c == ',') else if (c == ',')
{ {
......
...@@ -726,18 +726,21 @@ mark_hard_reg_early_clobbers (rtx insn, bool live_p) ...@@ -726,18 +726,21 @@ mark_hard_reg_early_clobbers (rtx insn, bool live_p)
static enum reg_class static enum reg_class
single_reg_class (const char *constraints, rtx op, rtx equiv_const) single_reg_class (const char *constraints, rtx op, rtx equiv_const)
{ {
int ignore_p; int curr_alt, c;
bool ignore_p;
enum reg_class cl, next_cl; enum reg_class cl, next_cl;
int c;
cl = NO_REGS; cl = NO_REGS;
for (ignore_p = false; for (ignore_p = false, curr_alt = 0;
(c = *constraints); (c = *constraints);
constraints += CONSTRAINT_LEN (c, constraints)) constraints += CONSTRAINT_LEN (c, constraints))
if (c == '#') if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
ignore_p = true; ignore_p = true;
else if (c == ',') else if (c == ',')
ignore_p = false; {
curr_alt++;
ignore_p = false;
}
else if (! ignore_p) else if (! ignore_p)
switch (c) switch (c)
{ {
...@@ -873,7 +876,7 @@ single_reg_operand_class (int op_num) ...@@ -873,7 +876,7 @@ single_reg_operand_class (int op_num)
void void
ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set) ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set)
{ {
int i, c, regno = 0; int i, curr_alt, c, regno = 0;
bool ignore_p; bool ignore_p;
enum reg_class cl; enum reg_class cl;
rtx op; rtx op;
...@@ -895,11 +898,16 @@ ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set) ...@@ -895,11 +898,16 @@ ira_implicitly_set_insn_hard_regs (HARD_REG_SET *set)
mode = (GET_CODE (op) == SCRATCH mode = (GET_CODE (op) == SCRATCH
? GET_MODE (op) : PSEUDO_REGNO_MODE (regno)); ? GET_MODE (op) : PSEUDO_REGNO_MODE (regno));
cl = NO_REGS; cl = NO_REGS;
for (ignore_p = false; (c = *p); p += CONSTRAINT_LEN (c, p)) for (ignore_p = false, curr_alt = 0;
if (c == '#') (c = *p);
p += CONSTRAINT_LEN (c, p))
if (c == '#' || !recog_data.alternative_enabled_p[curr_alt])
ignore_p = true; ignore_p = true;
else if (c == ',') else if (c == ',')
ignore_p = false; {
curr_alt++;
ignore_p = false;
}
else if (! ignore_p) else if (! ignore_p)
switch (c) switch (c)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment