diff options
author | Christoph Bumiller <[email protected]> | 2010-07-31 17:52:54 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-07-31 18:32:35 +0200 |
commit | fa67cabe7a9f1343e96c7c8a105e82dc05e3de44 (patch) | |
tree | 303a429b3a0cf3e65852e4689a337ec28334637f /src/gallium/drivers/nv50/nv50_pc.c | |
parent | 5705b45b6a050f908120779e6049853931a8025a (diff) |
nv50: fixes for nested IFs
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_pc.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_pc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc.c b/src/gallium/drivers/nv50/nv50_pc.c index 0e8aadf5a90..614982db2d0 100644 --- a/src/gallium/drivers/nv50/nv50_pc.c +++ b/src/gallium/drivers/nv50/nv50_pc.c @@ -464,3 +464,18 @@ void nvbb_attach_block(struct nv_basic_block *parent, struct nv_basic_block *b) b->in[b->num_in++] = parent; } + +int +nvbb_dominated_by(struct nv_basic_block *b, struct nv_basic_block *d) +{ + int j, n; + + if (b == d) + return 1; + + n = 0; + for (j = 0; j < b->num_in; ++j) + n += nvbb_dominated_by(b->in[j], d); + + return n && (n == b->num_in); +} |