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 /cse.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 'cse.c')
-rw-r--r-- | cse.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -76,6 +76,9 @@ static void clean_up_one_instruction(struct basic_block *bb, struct instruction case OP_SETVAL: hash += hashval(insn->val); + break; + + case OP_SYMADDR: hash += hashval(insn->symbol); break; @@ -188,11 +191,14 @@ static int insn_compare(const void *_i1, const void *_i2) return i1->src1 < i2->src1 ? -1 : 1; break; + case OP_SYMADDR: + if (i1->symbol != i2->symbol) + return i1->symbol < i2->symbol ? -1 : 1; + break; + case OP_SETVAL: if (i1->val != i2->val) return i1->val < i2->val ? -1 : 1; - if (i1->symbol != i2->symbol) - return i1->symbol < i2->symbol ? -1 : 1; break; /* Other */ |