nv50/ir: treat addresses as local
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 18 May 2016 00:44:21 +0000 (20:44 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 20 May 2016 00:20:23 +0000 (20:20 -0400)
Address registers are always loaded right before use. Don't treat them
as "global", which will cause them to be put into the function's
linkage, and will make the register allocator hold onto that
register until the end of the function.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp

index c085e3818ad92dfdcd29330c44361b71d29e2afe..345008e23a00282fcc4db83806610b98850c036e 100644 (file)
@@ -1168,7 +1168,7 @@ bool Source::scanDeclaration(const struct tgsi_full_declaration *decl)
       si = decl->Semantic.Index;
    }
 
-   if (decl->Declaration.Local) {
+   if (decl->Declaration.Local || decl->Declaration.File == TGSI_FILE_ADDRESS) {
       for (i = first; i <= last; ++i) {
          for (c = 0; c < 4; ++c) {
             locals.insert(