diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-13 12:00:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:06:07 -0700 |
commit | 6278edfccdbb3b6a0bbe9f066991e28564ea0884 (patch) | |
tree | d1f3c4fe4125a8899eb74c16e4b289b08c25cb04 /simplify.c | |
parent | Make sure to mark all registers that have already been allocated (diff) | |
download | sparse-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.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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); |