aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-13 12:00:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:07 -0700
commit6278edfccdbb3b6a0bbe9f066991e28564ea0884 (patch)
treed1f3c4fe4125a8899eb74c16e4b289b08c25cb04 /simplify.c
parentMake sure to mark all registers that have already been allocated (diff)
downloadsparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.tar.gz
sparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.tar.bz2
sparse-6278edfccdbb3b6a0bbe9f066991e28564ea0884.zip
Split OP_SETVAL into OP_SETVAL (fp expressions and labels) and OP_SYMADDR
(symbol addresses). They are pretty different. Symbol addresses have special meaning during various phases, from symbol simplification to CSE.
Diffstat (limited to 'simplify.c')
-rw-r--r--simplify.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/simplify.c b/simplify.c
index b2bb8d7..8392241 100644
--- a/simplify.c
+++ b/simplify.c
@@ -188,11 +188,9 @@ void kill_instruction(struct instruction *insn)
repeat_phase |= REPEAT_CSE;
return;
- case OP_SETVAL:
+ case OP_SYMADDR:
insn->bb = NULL;
- repeat_phase |= REPEAT_CSE;
- if (insn->symbol)
- repeat_phase |= REPEAT_SYMBOL_CLEANUP;
+ repeat_phase |= REPEAT_CSE | REPEAT_SYMBOL_CLEANUP;
return;
}
}
@@ -485,7 +483,7 @@ static int simplify_one_memop(struct instruction *insn, pseudo_t orig)
if (addr->type == PSEUDO_REG) {
struct instruction *def = addr->def;
- if (def->opcode == OP_SETVAL && def->src) {
+ if (def->opcode == OP_SYMADDR && def->src) {
kill_use(&insn->src);
use_pseudo(def->src, &insn->src);
return REPEAT_CSE | REPEAT_SYMBOL_CLEANUP;
@@ -736,7 +734,7 @@ int simplify_instruction(struct instruction *insn)
return simplify_unop(insn);
case OP_LOAD: case OP_STORE:
return simplify_memop(insn);
- case OP_SETVAL:
+ case OP_SYMADDR:
if (dead_insn(insn, NULL, NULL, NULL))
return REPEAT_CSE | REPEAT_SYMBOL_CLEANUP;
return replace_with_pseudo(insn, insn->symbol);