diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-28 20:38:23 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:14 -0700 |
commit | 89e78a3b4700b9c1cc204266772d4fe0647b1656 (patch) | |
tree | 7a5ad5083ae2a836566550d465462fe8946c0b8f /flow.c | |
parent | Oops. Don't try to CSE OP_SEL, at least not until we learn to (diff) | |
download | sparse-89e78a3b4700b9c1cc204266772d4fe0647b1656.tar.gz sparse-89e78a3b4700b9c1cc204266772d4fe0647b1656.tar.bz2 sparse-89e78a3b4700b9c1cc204266772d4fe0647b1656.zip |
Start using instruction sizes properly.
We should drop symbol types by now, and base things on just raw
sizes. Anything else just doesn't work from a CSE standpoint.
Some things may care about actual types later, notably the type-
based alias analysis. Those types still exist in the cast nodes.
Also, make the printout be more readable.
Diffstat (limited to 'flow.c')
-rw-r--r-- | flow.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -161,10 +161,10 @@ void convert_load_instruction(struct instruction *insn, pseudo_t src) static int overlapping_memop(struct instruction *a, struct instruction *b) { - unsigned int a_start = (a->offset << 3) + a->type->bit_offset; - unsigned int b_start = (b->offset << 3) + b->type->bit_offset; - unsigned int a_size = a->type->bit_size; - unsigned int b_size = b->type->bit_size; + unsigned int a_start = a->offset << 3; + unsigned int b_start = b->offset << 3; + unsigned int a_size = a->size; + unsigned int b_size = b->size; if (a_size + a_start <= b_start) return 0; @@ -175,9 +175,7 @@ static int overlapping_memop(struct instruction *a, struct instruction *b) static inline int same_memop(struct instruction *a, struct instruction *b) { - return a->offset == b->offset && - a->type->bit_size == b->type->bit_size && - a->type->bit_offset == b->type->bit_offset; + return a->offset == b->offset && a->size == b->size; } /* @@ -256,7 +254,7 @@ no_dominance: found_dominator: br = delete_last_instruction(&parent->insns); - phi = alloc_phi(parent, one->target); + phi = alloc_phi(parent, one->target, one->size); add_instruction(&parent->insns, br); use_pseudo(phi, add_pseudo(dominators, phi)); } END_FOR_EACH_PTR(parent); |