nvc0/ir: remove useless NVC0LoweringPass::gMemBase
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Oct 2016 11:02:02 +0000 (13:02 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Oct 2016 21:53:48 +0000 (23:53 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index 83154c1344df700973fb6a88222935c4e2aded96..7c9fad3442c23a3b94422cbd2da9d2ddeba968ef 100644 (file)
@@ -598,7 +598,6 @@ NVC0LegalizePostRA::visit(BasicBlock *bb)
 NVC0LoweringPass::NVC0LoweringPass(Program *prog) : targ(prog->getTarget())
 {
    bld.setProgram(prog);
-   gMemBase = NULL;
 }
 
 bool
@@ -1979,9 +1978,7 @@ NVC0LoweringPass::handleSurfaceOpNVE4(TexInstruction *su)
       }
       Instruction *red = bld.mkOp(OP_ATOM, su->dType, bld.getSSA());
       red->subOp = su->subOp;
-      if (!gMemBase)
-         gMemBase = bld.mkSymbol(FILE_MEMORY_GLOBAL, 0, TYPE_U32, 0);
-      red->setSrc(0, gMemBase);
+      red->setSrc(0, bld.mkSymbol(FILE_MEMORY_GLOBAL, 0, TYPE_U32, 0));
       red->setSrc(1, su->getSrc(3));
       if (su->subOp == NV50_IR_SUBOP_ATOM_CAS)
          red->setSrc(2, su->getSrc(4));