aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/example.c
diff options
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-10 14:17:20 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:56 -0700
commitd7f72582a83e46b26094e4072c433680373cea1c (patch)
tree7440d45463f34332342127be106f9400a2f1ef44 /example.c
parent5925cd42c163ead7e5fad701e5a34bb14382291d (diff)
downloadsparse-dev-d7f72582a83e46b26094e4072c433680373cea1c.tar.gz
Make target register allocation prefer empty registers.
Yeah, yeah, it's still pretty stupid.
Diffstat (limited to 'example.c')
-rw-r--r--example.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/example.c b/example.c
index da7a3a4a..563258ae 100644
--- a/example.c
+++ b/example.c
@@ -332,6 +332,10 @@ static struct hardreg *target_reg(struct bb_state *state, pseudo_t pseudo, pseud
if (reg && !reg->busy)
goto found;
+ reg = empty_reg(state);
+ if (reg)
+ goto found;
+
i = last_reg+1;
if (i >= REGNO)
i = 0;