Commit fd6beed4 by Steven Bosscher

resource.h (struct resources): Remove unch_memory member.

	* resource.h (struct resources): Remove unch_memory member.
	(CLEAR_RESOURCE): Don't clear unch_memory.
	* resource.c (mark_referenced_resources): Don't set it.
	(mark_set_resources): Likewise.
	(mark_target_live_regs): Don't clear it.
	(init_resource_info): Likewise.
	* reorg.c (resource_conflicts_p): Don't compare it.
	(redundant_insn): Don't set it.

From-SVN: r198895
parent 61216c26
2013-05-14 Steven Bosscher <steven@gcc.gnu.org> 2013-05-14 Steven Bosscher <steven@gcc.gnu.org>
* resource.h (struct resources): Remove unch_memory member.
(CLEAR_RESOURCE): Don't clear unch_memory.
* resource.c (mark_referenced_resources): Don't set it.
(mark_set_resources): Likewise.
(mark_target_live_regs): Don't clear it.
(init_resource_info): Likewise.
* reorg.c (resource_conflicts_p): Don't compare it.
(redundant_insn): Don't set it.
* rtl.h (next_label, skip_consecutive_labels, link_cc0_insns): * rtl.h (next_label, skip_consecutive_labels, link_cc0_insns):
Remove prototypes. Remove prototypes.
* emit-rtl.c (next_label): Remove unused function. * emit-rtl.c (next_label): Remove unused function.
......
...@@ -1300,11 +1300,7 @@ compare_for_stack_reg (rtx insn, stack_ptr regstack, rtx pat_src) ...@@ -1300,11 +1300,7 @@ compare_for_stack_reg (rtx insn, stack_ptr regstack, rtx pat_src)
/* The 386 can only represent death of the first operand in /* The 386 can only represent death of the first operand in
the case handled above. In all other cases, emit a separate the case handled above. In all other cases, emit a separate
pop and remove the death note from here. */ pop and remove the death note from here. */
/* link_cc0_insns (insn); */
remove_regno_note (insn, REG_DEAD, REGNO (XEXP (src2_note, 0))); remove_regno_note (insn, REG_DEAD, REGNO (XEXP (src2_note, 0)));
emit_pop_insn (insn, regstack, XEXP (src2_note, 0), emit_pop_insn (insn, regstack, XEXP (src2_note, 0),
EMIT_AFTER); EMIT_AFTER);
} }
......
...@@ -314,7 +314,6 @@ static int ...@@ -314,7 +314,6 @@ static int
resource_conflicts_p (struct resources *res1, struct resources *res2) resource_conflicts_p (struct resources *res1, struct resources *res2)
{ {
if ((res1->cc && res2->cc) || (res1->memory && res2->memory) if ((res1->cc && res2->cc) || (res1->memory && res2->memory)
|| (res1->unch_memory && res2->unch_memory)
|| res1->volatil || res2->volatil) || res1->volatil || res2->volatil)
return 1; return 1;
...@@ -1580,7 +1579,6 @@ redundant_insn (rtx insn, rtx target, rtx delay_list) ...@@ -1580,7 +1579,6 @@ redundant_insn (rtx insn, rtx target, rtx delay_list)
/* Insns we pass may not set either NEEDED or SET, so merge them for /* Insns we pass may not set either NEEDED or SET, so merge them for
simpler tests. */ simpler tests. */
needed.memory |= set.memory; needed.memory |= set.memory;
needed.unch_memory |= set.unch_memory;
IOR_HARD_REG_SET (needed.regs, set.regs); IOR_HARD_REG_SET (needed.regs, set.regs);
/* This insn isn't redundant if it conflicts with an insn that either is /* This insn isn't redundant if it conflicts with an insn that either is
......
...@@ -240,9 +240,7 @@ mark_referenced_resources (rtx x, struct resources *res, ...@@ -240,9 +240,7 @@ mark_referenced_resources (rtx x, struct resources *res,
case MEM: case MEM:
/* If this memory shouldn't change, it really isn't referencing /* If this memory shouldn't change, it really isn't referencing
memory. */ memory. */
if (MEM_READONLY_P (x)) if (! MEM_READONLY_P (x))
res->unch_memory = 1;
else
res->memory = 1; res->memory = 1;
res->volatil |= MEM_VOLATILE_P (x); res->volatil |= MEM_VOLATILE_P (x);
...@@ -740,7 +738,6 @@ mark_set_resources (rtx x, struct resources *res, int in_dest, ...@@ -740,7 +738,6 @@ mark_set_resources (rtx x, struct resources *res, int in_dest,
if (in_dest) if (in_dest)
{ {
res->memory = 1; res->memory = 1;
res->unch_memory |= MEM_READONLY_P (x);
res->volatil |= MEM_VOLATILE_P (x); res->volatil |= MEM_VOLATILE_P (x);
} }
...@@ -896,7 +893,7 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res) ...@@ -896,7 +893,7 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res)
/* We have to assume memory is needed, but the CC isn't. */ /* We have to assume memory is needed, but the CC isn't. */
res->memory = 1; res->memory = 1;
res->volatil = res->unch_memory = 0; res->volatil = 0;
res->cc = 0; res->cc = 0;
/* See if we have computed this value already. */ /* See if we have computed this value already. */
...@@ -1145,7 +1142,6 @@ init_resource_info (rtx epilogue_insn) ...@@ -1145,7 +1142,6 @@ init_resource_info (rtx epilogue_insn)
end_of_function_needs.cc = 0; end_of_function_needs.cc = 0;
end_of_function_needs.memory = 1; end_of_function_needs.memory = 1;
end_of_function_needs.unch_memory = 0;
CLEAR_HARD_REG_SET (end_of_function_needs.regs); CLEAR_HARD_REG_SET (end_of_function_needs.regs);
if (frame_pointer_needed) if (frame_pointer_needed)
......
...@@ -25,14 +25,13 @@ along with GCC; see the file COPYING3. If not see ...@@ -25,14 +25,13 @@ along with GCC; see the file COPYING3. If not see
/* Macro to clear all resources. */ /* Macro to clear all resources. */
#define CLEAR_RESOURCE(RES) \ #define CLEAR_RESOURCE(RES) \
do { (RES)->memory = (RES)->unch_memory = (RES)->volatil = (RES)->cc = 0; \ do { (RES)->memory = (RES)->volatil = (RES)->cc = 0; \
CLEAR_HARD_REG_SET ((RES)->regs); } while (0) CLEAR_HARD_REG_SET ((RES)->regs); } while (0)
/* The resources used by a given insn. */ /* The resources used by a given insn. */
struct resources struct resources
{ {
char memory; /* Insn sets or needs a memory location. */ char memory; /* Insn sets or needs a memory location. */
char unch_memory; /* Insn sets or needs an "unchanging" MEM. */
char volatil; /* Insn sets or needs a volatile memory loc. */ char volatil; /* Insn sets or needs a volatile memory loc. */
char cc; /* Insn sets or needs the condition codes. */ char cc; /* Insn sets or needs the condition codes. */
HARD_REG_SET regs; /* Which registers are set or needed. */ HARD_REG_SET regs; /* Which registers are set or needed. */
......
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