aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-12 18:07:42 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:06:04 -0700
commit3034109abbb6516f95e9805db471bfbe5eae5f75 (patch)
tree03b05afbefd0abb52470c159516f29341ad977b8 /example.c
parentAdd a one-deep CC-cache for condition code setting and usage. (diff)
downloadsparse-3034109abbb6516f95e9805db471bfbe5eae5f75.tar.gz
sparse-3034109abbb6516f95e9805db471bfbe5eae5f75.tar.bz2
sparse-3034109abbb6516f95e9805db471bfbe5eae5f75.zip
If we decide to mark a register as being its own storage,
return NULL from find_pseudo_storage(). That way the caller won't bother to move the register to itself - it sees that it has no separate storage.
Diffstat (limited to 'example.c')
-rw-r--r--example.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/example.c b/example.c
index f77b4aa..3c1fec3 100644
--- a/example.c
+++ b/example.c
@@ -344,8 +344,9 @@ static struct storage_hash *find_pseudo_storage(struct bb_state *state, pseudo_t
if (reg && !reg->used) {
src->storage->type = REG_REG;
src->storage->regno = reg - hardregs;
- } else
- alloc_stack(state, src->storage);
+ return NULL;
+ }
+ alloc_stack(state, src->storage);
}
return src;
}