diff options
author | marha <marha@users.sourceforge.net> | 2011-08-29 08:51:20 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-08-29 08:51:20 +0200 |
commit | 01df5d59e56a1b060568f8cad2e89f7eea22fc70 (patch) | |
tree | 9db83037fd85d0974b60fc1a05e0665083f26000 /mesalib/src/mesa/program/register_allocate.c | |
parent | fd1f4d9fe3ea67fa6def8ee4927a8f71e0440f12 (diff) | |
download | vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.gz vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.tar.bz2 vcxsrv-01df5d59e56a1b060568f8cad2e89f7eea22fc70.zip |
xwininfo libX11 libXmu libxcb mesa xserver xkeyboard-config git update 29
aug 2011
Diffstat (limited to 'mesalib/src/mesa/program/register_allocate.c')
-rw-r--r-- | mesalib/src/mesa/program/register_allocate.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mesalib/src/mesa/program/register_allocate.c b/mesalib/src/mesa/program/register_allocate.c index de96eb42c..f5b5174fc 100644 --- a/mesalib/src/mesa/program/register_allocate.c +++ b/mesalib/src/mesa/program/register_allocate.c @@ -200,6 +200,27 @@ ra_add_reg_conflict(struct ra_regs *regs, unsigned int r1, unsigned int r2) } } +/** + * Adds a conflict between base_reg and reg, and also between reg and + * anything that base_reg conflicts with. + * + * This can simplify code for setting up multiple register classes + * which are aggregates of some base hardware registers, compared to + * explicitly using ra_add_reg_conflict. + */ +void +ra_add_transitive_reg_conflict(struct ra_regs *regs, + unsigned int base_reg, unsigned int reg) +{ + int i; + + ra_add_reg_conflict(regs, reg, base_reg); + + for (i = 0; i < regs->regs[base_reg].num_conflicts; i++) { + ra_add_reg_conflict(regs, reg, regs->regs[base_reg].conflict_list[i]); + } +} + unsigned int ra_alloc_reg_class(struct ra_regs *regs) { |