[Mesa-dev] [PATCH 1/3] nv50/ir: VFETCH is also considered a load for MemoryOpt

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Jun 26 20:06:48 UTC 2017


Would be better to introduce a helper into MemoryOpt for that (same for 
stores).

Either way, looks good.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 06/25/2017 12:39 AM, Ilia Mirkin wrote:
> This has no effect since in practice this will only play for
> memory-backed files, for which VFETCH will never happen.
> 
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>   src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> index 4c92a1efb51..3eab0426716 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> @@ -2640,7 +2640,7 @@ MemoryOpt::findRecord(const Instruction *insn, bool load, bool& isAdj) const
>      Record *it = load ? loads[sym->reg.file] : stores[sym->reg.file];
>   
>      for (; it; it = it->next) {
> -      if (it->locked && insn->op != OP_LOAD)
> +      if (it->locked && insn->op != OP_LOAD && insn->op != OP_VFETCH)
>            continue;
>         if ((it->offset >> 4) != (sym->reg.data.offset >> 4) ||
>             it->rel[0] != insn->getIndirect(0, 0) ||
> 


More information about the mesa-dev mailing list